Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

C# .NET implementation of Murmur Hash

License

NotificationsYou must be signed in to change notification settings

jitbit/MurmurHash.net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

C# implementation of Murmur Hash 2

Usage:

MurmurHash2.Hash("mystring");MurmurHash2.Hash(byteArray);

I wrote a small benchmark to test the number of collisions on a 466k words (list of all English words taken from here:https://github.com/dwyl/english-words) andthe number of collisions is 22 which I consider a pretty good result.

Standardstring.GetHashCode() gives48 collisions on the 466k word list.

Elapsed time (on the 466k word list):

HashElapsed time# of collisions
MurmurHash2104 ms22
GetHashCode47 ms48

On the numbers from1 to999999 (think ZIP codes) the results were:

HashElapsed time# of collisions
MurmurHash2234 ms56
GetHashCode121 ms0

GetHashCode is better with collisions here, but MurMur shines on longer texts.

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp