2 ms·
According to the author that wasn't a design goal: > While looking all this up, I found Justin Fagnani’s article Composite Map Keys in JavaScript with Bitsets,
by sltkr 1y ago
According to the author that wasn't a design goal:
> While looking all this up, I found Justin Fagnani’s article Composite Map Keys in JavaScript with Bitsets, which is mostly unrelated to what I’m doing here
In fact, the author specifically wants his records to be mutable, which precludes using them as Set or Map keys (at least at the same time).
So immutable bigints seem like sort of the wrong tool for the job: changing any single field requires creating a completely new number (and while in theory a compiler might be able to optimize away the copy, in practice I doubt this happens).
- recursive 1y agoOh yeah. Huh. I guess I read that wrong.