persistent-hash-trie
persistent-hash-trie copied to clipboard
dissoc removing other entries
I know this project is not active, but I was benchmarking JS hashtrie implementations and I think dissoc
has a bug:
var p = require('persistent-hash-trie');
var h = p.Trie();
var h1 = p.assoc(h, 'q', true);
var h2 = p.assoc(h1, 'gv', true);
// Remove other key.
var h3 = p.dissoc(h2, 'q');
console.log(p.has(h3, 'gv')); // false
My benchmarks results for removing all elements of a hashtrie showed this library to be 10x faster, while it was consistently slower for single removes and group puts. I believe this is the cause.