Skip to content

Change the hasher used for HashMap/Sets#414

Merged
SpaceManiac merged 2 commits intoSpaceManiac:masterfrom
ZeWaka:zewaka/fast-hash
Nov 9, 2024
Merged

Change the hasher used for HashMap/Sets#414
SpaceManiac merged 2 commits intoSpaceManiac:masterfrom
ZeWaka:zewaka/fast-hash

Conversation

@ZeWaka
Copy link
Copy Markdown
Contributor

@ZeWaka ZeWaka commented Nov 2, 2024

I chose to use foldhash since we're not needing cryptographically secure hashing, nor are we concerned with people reverse-engineering application state.

Basically just changing the RandomState or the HashMap/Set import everywhere. The *Ext types provide the ::new() interface.

Tested dm-langserver, all works well:
image

Copy link
Copy Markdown
Owner

@SpaceManiac SpaceManiac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also seeing a clear 7-9% speedup on a couple of machines. Binary size is not increased.

@SpaceManiac SpaceManiac merged commit d19602a into SpaceManiac:master Nov 9, 2024
@ZeWaka ZeWaka deleted the zewaka/fast-hash branch November 29, 2024 15:55
@SpaceManiac SpaceManiac added this to the suite v1.10 milestone May 12, 2025
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.

2 participants