{"id":13819474,"url":"https://github.com/wangyi-fudan/wyhash","last_synced_at":"2025-05-16T04:34:03.062Z","repository":{"id":41434738,"uuid":"174089506","full_name":"wangyi-fudan/wyhash","owner":"wangyi-fudan","description":"The FASTEST QUALITY hash function, random number generators (PRNG) and hash map.","archived":false,"fork":false,"pushed_at":"2024-06-07T04:05:43.000Z","size":9833,"stargazers_count":970,"open_issues_count":17,"forks_count":73,"subscribers_count":38,"default_branch":"master","last_synced_at":"2024-11-19T18:48:48.718Z","etag":null,"topics":["bloom-filter","c","fast","hash","hashmap","random-number-generators","simple"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wangyi-fudan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-06T06:57:06.000Z","updated_at":"2024-11-12T11:11:15.000Z","dependencies_parsed_at":"2023-12-03T02:23:55.257Z","dependency_job_id":"3d59a16b-6e64-4436-b890-b81b5e50c22b","html_url":"https://github.com/wangyi-fudan/wyhash","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangyi-fudan%2Fwyhash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangyi-fudan%2Fwyhash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangyi-fudan%2Fwyhash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wangyi-fudan%2Fwyhash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wangyi-fudan","download_url":"https://codeload.github.com/wangyi-fudan/wyhash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254470304,"owners_count":22076566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bloom-filter","c","fast","hash","hashmap","random-number-generators","simple"],"created_at":"2024-08-04T08:00:48.784Z","updated_at":"2025-05-16T04:34:02.528Z","avatar_url":"https://github.com/wangyi-fudan.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"wyhash has evolved into [rapidhash](https://github.com/Nicoshev/rapidhash) !  \nWith improved speed, quality and compatibility.\n====\n\nNo hash function is perfect, but some are useful.\n====\n\nwyhash and wyrand are the ideal 64-bit hash function and PRNG respectively: \n\n**solid**:  wyhash passed SMHasher, wyrand passed BigCrush, practrand.\n\n**portable**: 64-bit/32-bit system, big/little endian.\n  \n**fastest**:  Efficient on 64-bit machines, especially for short keys.\n  \n**simplest**: In the sense of code size.\n\n**salted**: We use dynamic secret to avoid intended attack.\n\nwyhash is the default hashing algorithm of the great [Zig](https://ziglang.org), [V](https://vlang.io), [Nim](https://nim-lang.org) and [Go (since 1.17)](https://golang.org/src/runtime/hash64.go) language. One milestone is that wyhash has deployed by Microsoft on [Windows Terminal] (https://github.com/microsoft/terminal/pull/13686).\n\n**Simple Example:**\n```\n#include  \"wyhash.h\"\nuint64_t _wyp[4];\nmake_secret(time(NULL),_wyp);\nstring  s=\"fcdskhfjs\";\nuint64_t h=wyhash(s.c_str(),s.size(),0,_wyp);\n```\n\n**Limitations:**\n\nIt is known now that wyhash/wyrand have their limitations:\n\nBoth of them are not 64 bit collision resistant, but is about 62 bits (flyingmutant/Cyan4973/vigna)\n\nWhen test on longer dataset (32TB, 23 days), wyrand will fail practrand (vigna)\n\nAnd there may be more flaws detected in the future. \n\nUser should make their own decision based the advantage and the flaws of wyhash/wyrand as no one is perfect.\n\n----------------------------------------\n\n**C#**  https://github.com/cocowalla/wyhash-dotnet\n\n**C++**  https://github.com/tommyettinger/waterhash\n\n**C++** https://github.com/alainesp/wy\n\n**GO**  https://github.com/dgryski/go-wyhash\n\n**GO**  https://github.com/orisano/wyhash\n\n**GO** https://github.com/littleli/go-wyhash16\n\n**GO** https://github.com/zeebo/wyhash\n\n**GO** https://github.com/lonewolf3739/wyhash-go\n\n**GO** https://github.com/zhangyunhao116/wyhash (final version 1 \u0026\u0026 3)\n\n**Java** https://github.com/OpenHFT/Zero-Allocation-Hashing\n\n**Java** https://github.com/dynatrace-oss/hash4j (final version 3 and 4)\n\n**Kotlin Multiplatform** https://github.com/appmattus/crypto/tree/main/cryptohash\n\n**Nim** https://github.com/nim-lang/Nim/blob/devel/lib/pure/hashes.nim\n\n**Nim** https://github.com/jackhftang/wyhash.nim\n\n**Nim** https://github.com/littleli/nim-wyhash16\n\n**Rust**  https://github.com/eldruin/wyhash-rs\n\n**Swift** https://github.com/lemire/SwiftWyhash\n\n**Swift**  https://github.com/lemire/SwiftWyhashBenchmark\n\n**Swift**  https://github.com/jeudesprits/PSWyhash\n\n**V** https://github.com/vlang/v/tree/master/vlib/hash/wyhash (v4)\n\n**Zig** https://github.com/ManDeJan/zig-wyhash\n\n**absl hashmap** https://github.com/abseil/abseil-cpp/blob/master/absl/hash/internal/low_level_hash.h\n\n----------------------------------------\n\nI thank these names:\n\nReini Urban\n\nDietrich Epp\n\nJoshua Haberman\n\nTommy Ettinger\n\nDaniel Lemire\n\nOtmar Ertl\n\ncocowalla\n\nleo-yuriev\n\nDiego Barrios Romero\n\npaulie-g \n\ndumblob\n\nYann Collet\n\nivte-ms\n\nhyb\n\nJames Z.M. Gao\n\neasyaspi314 (Devin)\n\nTheOneric\n\nflyingmutant\n\nvigna\n\ntansy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangyi-fudan%2Fwyhash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwangyi-fudan%2Fwyhash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwangyi-fudan%2Fwyhash/lists"}