@forgelab/arena
v1.0.0
Published
A javascript memory pool based on `Float32Array` that is very easy to use and extremely fast, with minimal overhead for each allocation or deletion and no garbage collection (GC) overhead.
Downloads
217
Readme
Arena
A javascript memory pool based on Float32Array
that is very easy to use and extremely fast, with minimal overhead for each allocation or deletion and no garbage collection (GC) overhead.
Example
import { arena } from '@forgelab/arena';
const memory = arena();
const p1 = memory.create([1, 2, 3]);
p1.update([4, 5]);
p1.update([6, 7, 8, 9]);
const p2 = p1.clone();
console.log(p2.value);