Judy Arrays for Node.js
Judy Arrays allow for fast and memory efficient access to in-memory hash tables.
Instantiation is slow, but continued use shows speed increases over native
Some code cleanup was done to allow for clean compilation with
For more information, see Faster (sometimes) Associative Arrays with Node.js.
In a nutshell
- Implements Judy Arrays via C++
node-gyp configure build
Testing and Benchmarking
There are a couple of tests, as well as a couple of benchmarks to compare against native associative arrays.
node tests/big.js node tests/multiple.js
node bench/native.js node bench/judy.js node bench/native.js --count=2000 node bench/judy.js --count=2000
var judy = require('judy'); var arr = new judy.Judy(); arr.set("some key", "some value"); var value = arr.get("some key"); arr.delete("some key");