Repository navigation
Read native map-key bits without rebuilding the key - #1725
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lorenzobattistela
approved these changes
Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Map.bit can return the same key without rebuilding every visited String node. This C path walks the original key, decodes the existing 33-bit character slots, and forwards the original key word. Base, JS and the trie encoding are unchanged.
Seven alternating native process pairs on the complete shared-key consumer in #1724: median 115 → 43 ms. Every run returned the independent checksum 16143 and confirmed that the original shared key still matched.
The new boundary program checks empty/NUL keys, presence bits, bit 31/0, character transitions, full U32 character codes and computed positions up to 2^48-1. It passed on native 1/4 threads, Bun and Node. Five existing map/Set/array/sharing programs passed another 15 real runs on Bun and native 1/4 threads. A separate unique-key native consumer passed too. The boundary and unique-key consumers also passed ASan+UBSan with leak detection and empty diagnostics.
Fixes #1724
Removed the GUIDE.md changes as requested in #1644.