Skip to content

feat(primitives): use foldhash for fixed-size maps - #1153

Merged
onbjerg merged 2 commits into
mainfrom
onbjerg/foldhash-fixed-maps
Jul 16, 2026
Merged

onbjerg merged 2 commits into
mainfrom
onbjerg/foldhash-fixed-maps

Conversation

@onbjerg

@onbjerg onbjerg commented Jul 16, 2026

Copy link
Copy Markdown
Member

Fixed-size map aliases such as U256Map now use foldhash's fast RandomState through FbBuildHasher instead of FxHash. The fixed-byte map aliases retain their existing API and specialized hashing path, while foldhash supplies randomized per-builder state in both std and no_std builds. The old rustc-hash dependency is now only needed when map-fxhash is enabled.

Generic map::HashMap defaults remain unchanged. The fixed-map test suite, feature checks, and workspace compilation pass.

Comment thread crates/primitives/src/map/fixed.rs Resolved
@onbjerg
onbjerg marked this pull request as ready for review July 16, 2026 13:59
@onbjerg
onbjerg requested a review from mattsse as a code owner July 16, 2026 13:59
@github-project-automation github-project-automation Bot moved this to Reviewed in Alloy Jul 16, 2026
@onbjerg
onbjerg enabled auto-merge (squash) July 16, 2026 14:04
@onbjerg
onbjerg merged commit e63cf6f into main Jul 16, 2026
31 checks passed
@onbjerg
onbjerg deleted the onbjerg/foldhash-fixed-maps branch July 16, 2026 14:09
@github-project-automation github-project-automation Bot moved this from Reviewed to Done in Alloy Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants