Skip to content

Add HAMT hash-path traversal - #447

Draft
helly25 wants to merge 2 commits into
feature/hamt-bitmap-corefrom
feature/hamt-hash-path
Draft

helly25 wants to merge 2 commits into
feature/hamt-bitmap-corefrom
feature/hamt-hash-path

Conversation

@helly25

@helly25 helly25 commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Add the shared constexpr primitive that splits 32- and 64-bit hashes into HAMT traversal fragments. The same implementation covers every 4- through 7-bit candidate width without coupling dense IDs to hash width.

AG;DR

  • adds unsigned 32- and 64-bit hash-path traversal
  • computes the required trie depth at compile time
  • handles partial final fragments without reading beyond the hash width
  • reconstructs representative hashes in tests for every candidate fragment width
  • validates constexpr use and the non-divisible width cases
  • follows the internal PascalCase naming policy for hash-path operations

Validation:

  • bazel test //mbo/container:hamt_hash_path_test
  • focused pre-commit passed with local clang-tidy and the sandbox-incompatible trunk wrapper explicitly skipped; clang-format passed

This is a chained draft based on PR #446 and must not merge before its predecessors.

@helly25
helly25 force-pushed the feature/hamt-bitmap-core branch from d19d92e to f531523 Compare September 11, 2026 09:36
@helly25
helly25 force-pushed the feature/hamt-hash-path branch from a90bbe8 to cdb2580 Compare September 11, 2026 09:36
@helly25
helly25 force-pushed the feature/hamt-hash-path branch from cdb2580 to 7a7ad04 Compare September 11, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant