anko / array-keyed-map Goto Github PK
View Code? Open in Web Editor NEWJS datastructure, like Map, but the keys are arrays
License: ISC License
JS datastructure, like Map, but the keys are arrays
License: ISC License
I was trying to create an ArrayKeyMap of size 7,66,000 with each key of type
[int, string, 9 to 29 additional integers]
<--- Last few GCs --->
[31048:0000017180A75FD0] 14792 ms: Scavenge 2016.7 (2056.4) -> 2016.2 (2067.1) MB, 6.3 / 0.0 ms (average mu = 0.161, current mu = 0.112) a
llocation failure
[31048:0000017180A75FD0] 14805 ms: Scavenge 2023.2 (2067.1) -> 2022.6 (2067.4) MB, 7.4 / 0.0 ms (average mu = 0.161, current mu = 0.112) a
llocation failure
[31048:0000017180A75FD0] 14822 ms: Scavenge 2024.0 (2067.4) -> 2023.1 (2089.1) MB, 14.9 / 0.0 ms (average mu = 0.161, current mu = 0.112)
allocation failure
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF60F11E3EF v8::internal::CodeObjectRegistry::~CodeObjectRegistry+111951
2: 00007FF60F0ADA36 v8::internal::WebSnapshotDeserializer::context_count+65446
3: 00007FF60F0AE8ED node::OnFatalError+301
4: 00007FF60F9EA78E v8::Isolate::ReportExternalAllocationLimitReached+94
5: 00007FF60F9D540D v8::SharedArrayBuffer::Externalize+781
6: 00007FF60F857F0C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1468
7: 00007FF60F864AAF v8::internal::Heap::PublishPendingAllocations+1103
8: 00007FF60F861ABA v8::internal::Heap::PageFlagsAreConsistent+2842
9: 00007FF60F854B2F v8::internal::Heap::CollectGarbage+1967
10: 00007FF60F85D05B v8::internal::Heap::GlobalSizeOfObjects+315
11: 00007FF60F8A0A8B v8::internal::StackGuard::HandleInterrupts+891
12: 00007FF60F5A72E6 v8::internal::DateCache::Weekday+6902
13: 00007FF60FA72B11 v8::internal::SetupIsolateDelegate::SetupHeap+472849
14: 00007FF60FA4E7E0 v8::internal::SetupIsolateDelegate::SetupHeap+324576
15: 000001718268B110
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map
It would be neato if this had all of that, and the readme could say "It's literally exactly Map
, but the keys are arrays".
Tracking:
new Map()
new Map([iterable])
.size
[@@toStringTag]
[@@species]
(unnecessary; we're not prototype-deriving from Map
).clear()
.delete()
.entries()
.forEach()
.get()
.has()
.keys()
.set()
.values()
[@@iterator]()
NOt an issue.
I am using array-keyed-map in my project. I would like to store my map as a JSON file. and I am writing multiple functions for different akmaps to save them to a file. I am just looking for a uniform way to store the akmap as a file.
thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.