{"id":13396784,"url":"https://github.com/cespare/xxhash","last_synced_at":"2025-05-13T00:27:15.337Z","repository":{"id":38619620,"uuid":"66737655","full_name":"cespare/xxhash","owner":"cespare","description":"A Go implementation of the 64-bit xxHash algorithm (XXH64)","archived":false,"fork":false,"pushed_at":"2024-07-03T18:24:03.000Z","size":98,"stargazers_count":1803,"open_issues_count":9,"forks_count":124,"subscribers_count":31,"default_branch":"main","last_synced_at":"2024-10-29T19:59:38.822Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cespare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2016-08-27T22:08:31.000Z","updated_at":"2024-10-28T17:41:35.000Z","dependencies_parsed_at":"2024-06-26T12:24:20.096Z","dependency_job_id":"67707571-f2b8-4718-9be6-8f4f20bbf4d0","html_url":"https://github.com/cespare/xxhash","commit_stats":{"total_commits":100,"total_committers":13,"mean_commits":"7.6923076923076925","dds":"0.18000000000000005","last_synced_commit":"ab37246c889f9db16b606fda1c232d659df9271d"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cespare%2Fxxhash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cespare%2Fxxhash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cespare%2Fxxhash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cespare%2Fxxhash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cespare","download_url":"https://codeload.github.com/cespare/xxhash/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247888558,"owners_count":21013001,"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":[],"created_at":"2024-07-30T18:01:03.100Z","updated_at":"2025-04-08T17:14:03.408Z","avatar_url":"https://github.com/cespare.png","language":"Go","funding_links":[],"categories":["Library","开源类库","Awesome","Go","Open source library","Members"],"sub_categories":["算法","Algorithm"],"readme":"# xxhash\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/cespare/xxhash/v2.svg)](https://pkg.go.dev/github.com/cespare/xxhash/v2)\n[![Test](https://github.com/cespare/xxhash/actions/workflows/test.yml/badge.svg)](https://github.com/cespare/xxhash/actions/workflows/test.yml)\n\nxxhash is a Go implementation of the 64-bit [xxHash] algorithm, XXH64. This is a\nhigh-quality hashing algorithm that is much faster than anything in the Go\nstandard library.\n\nThis package provides a straightforward API:\n\n```\nfunc Sum64(b []byte) uint64\nfunc Sum64String(s string) uint64\ntype Digest struct{ ... }\n    func New() *Digest\n```\n\nThe `Digest` type implements hash.Hash64. Its key methods are:\n\n```\nfunc (*Digest) Write([]byte) (int, error)\nfunc (*Digest) WriteString(string) (int, error)\nfunc (*Digest) Sum64() uint64\n```\n\nThe package is written with optimized pure Go and also contains even faster\nassembly implementations for amd64 and arm64. If desired, the `purego` build tag\nopts into using the Go code even on those architectures.\n\n[xxHash]: https://xxhash.com/\n\n## Compatibility\n\nThis package is in a module and the latest code is in version 2 of the module.\nYou need a version of Go with at least \"minimal module compatibility\" to use\ngithub.com/cespare/xxhash/v2:\n\n* 1.9.7+ for Go 1.9\n* 1.10.3+ for Go 1.10\n* Go 1.11 or later\n\nI recommend using the latest release of Go.\n\n## Benchmarks\n\nHere are some quick benchmarks comparing the pure-Go and assembly\nimplementations of Sum64.\n\n| input size | purego    | asm       |\n| ---------- | --------- | --------- |\n| 4 B        |  1.3 GB/s |  1.2 GB/s |\n| 16 B       |  2.9 GB/s |  3.5 GB/s |\n| 100 B      |  6.9 GB/s |  8.1 GB/s |\n| 4 KB       | 11.7 GB/s | 16.7 GB/s |\n| 10 MB      | 12.0 GB/s | 17.3 GB/s |\n\nThese numbers were generated on Ubuntu 20.04 with an Intel Xeon Platinum 8252C\nCPU using the following commands under Go 1.19.2:\n\n```\nbenchstat \u003c(go test -tags purego -benchtime 500ms -count 15 -bench 'Sum64$')\nbenchstat \u003c(go test -benchtime 500ms -count 15 -bench 'Sum64$')\n```\n\n## Projects using this package\n\n- [InfluxDB](https://github.com/influxdata/influxdb)\n- [Prometheus](https://github.com/prometheus/prometheus)\n- [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics)\n- [FreeCache](https://github.com/coocood/freecache)\n- [FastCache](https://github.com/VictoriaMetrics/fastcache)\n- [Ristretto](https://github.com/dgraph-io/ristretto)\n- [Badger](https://github.com/dgraph-io/badger)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcespare%2Fxxhash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcespare%2Fxxhash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcespare%2Fxxhash/lists"}