Daniel Lemire ships constmap, a cross-language map faster and leaner than Python dict
lemire · x · 2026-09-24
Performance researcher Daniel Lemire released constmap, an immutable string-to-integer map data structure with interoperable implementations in Python, C, Rust, and Go.
- Targets large unchanging maps, a common need in machine learning
- Verified variants check key existence at small cost; the new "paired verified" variant is 20% faster than the prior verified version
- Adds getmany for batched lookups
- In Python it uses far less memory than a dict and is faster; maps can be persisted to disk and shared across languages
Ports to other languages are invited; the project is open source.
More from coding & agent
- Stanford's Paper2Agent turns research papers and their code into collaborating AI agents — VraserX · 2026-09-24
- px0 update: open GitHub PRs with `px0 <url>`, with built-in git actions — arpit_bhayani · 2026-09-24
- tldraw engineer details the technical challenges of harnessing agents on the canvas — max__drake · 2026-09-24
- px0 v0.1.9 launches: a sub-1ms, open-source IDE built for AI-assisted code review — arpit_bhayani · 2026-09-24
- HQ founder: the multi-model, multi-agent coding future has arrived — jacob_posel · 2026-09-24
- Claude Opus 5.5 designs a real LEGO duck: 1,113 parts, 0 collisions, 237 steps — victormustar · 2026-09-24