Gathering detailed insights and metrics for memop
Gathering detailed insights and metrics for memop
Gathering detailed insights and metrics for memop
Gathering detailed insights and metrics for memop
npm install memop
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
3 Stars
41 Commits
2 Forks
1 Watching
1 Branches
1 Contributors
Updated on 04 Mar 2020
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
0%
2
Compared to previous day
Last week
400%
5
Compared to previous week
Last month
-44.8%
16
Compared to previous month
Last year
-6.1%
567
Compared to previous year
7
Memory Operations
1npm install memop
Pool
1let pool = new Pool(function () { 2 return vmath.vec3.new(1,1,1); 3}, 256); 4 5let a = pool.alloc(); 6let b = pool.alloc(); 7 8// do stuff... 9 10pool.free(a); 11pool.free(b);
RecyclePool
1let pool = new RecyclePool(function () { 2 return { 3 age: 0, 4 velocity: [1,1,1] 5 }; 6}, 256); 7 8pool.add(); 9pool.add(); 10 11for (let i = 0; i < pool.length; ++i) { 12 let p = pool.data[i]; 13 14 // do stuff... 15 16 if (p.age > 10) { 17 pool.remove(i); 18 --i; 19 } 20}
FixedArray
1let array = new FixedArray(100); 2 3array.push(0); 4array.push(1); 5array.push(3); 6array.push(4); 7 8// do stuff... 9 10array.fastRemove(2);
TypedArrayPool
1let array1 = TypedArrayPool.alloc_float32(100); 2let array2 = TypedArrayPool.alloc_int16(32); 3 4// do stuff... 5 6TypedArrayPool.free(array1); 7TypedArrayPool.free(array2);
LinkedArray
1let arr = new LinkedArray(100, () => { 2 return { 3 name: '', 4 next: null, 5 prev: null, 6 }; 7}); 8 9let node = arr.add(); 10node.name = 'foobar'; 11 12arr.forEach(item => { 13 // do stuff... 14});
MIT © 2017 Johnny Wu
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More