Skip to content

Replace V8 Map with a Int32Array-indexed hashtable #61

@alanzabihi

Description

@alanzabihi

Per #58, V8 Map.get has overhead from its internal ordered dictionary. A hand-rolled hashtable using Int32Array for slots (indices into a string/number parallel array) avoids V8 Map's bookkeeping. Fixed size 128 slots, djb2 hash mod 128, linear probe on collision. For 30-input bench this is collision-free after warmup. Compare against Map baseline. Fingerprint exact. Target: 1-3ms; risky if hash + probe > Map.get internals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions