Hash maps without javascript

This hashmap implementation uses slots and pairs.
Each triple contains a cached hash, the key, and the value.

blocks

project

Each pair contains a cached hash, the key, and the value.

Those are called “triples.” :~P

This is nice. I would start with ~100 slots, so that the early running of the program that uses it isn’t slowed down by constant growing the heap. Similarly, when growing the heap, instead of picking the next larger prime, I’d double the old size and take the next larger prime after that. (Or have your list of primes be just ones that grow roughly exponentially.)

about the growth issue, I thought about it

and that inital size issue, I fixed it

O(1) time complex?

Yea, but its slow.
10k accesses go at around 3 seconds on firefox, and on chrome its 5.

Something strange (seems to be a Snap problem).

  1. Open OP project
  2. hash maps script pic (10) Rename all… hash maps script pic (13)

  3. hash maps script pic (15) become corrupted (local variable map is now map1)

@BH, :snap: does not update variable watcher containing hash object.
How to look at internals of the ADT variable?