{"id":18821627,"url":"https://github.com/octu0/pch","last_synced_at":"2025-07-23T02:04:18.918Z","repository":{"id":237930511,"uuid":"795512322","full_name":"octu0/pch","owner":"octu0","description":"Power Consistent Hashing","archived":false,"fork":false,"pushed_at":"2024-05-03T12:53:20.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-22T10:13:21.191Z","etag":null,"topics":["consistent-hash-algorithm","consistent-hashing"],"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/octu0.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":"2024-05-03T12:51:45.000Z","updated_at":"2024-05-14T01:30:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"44b01663-250b-4de1-a579-069054d54f5c","html_url":"https://github.com/octu0/pch","commit_stats":null,"previous_names":["octu0/pch"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/octu0/pch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octu0%2Fpch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octu0%2Fpch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octu0%2Fpch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octu0%2Fpch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octu0","download_url":"https://codeload.github.com/octu0/pch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octu0%2Fpch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266603993,"owners_count":23954724,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["consistent-hash-algorithm","consistent-hashing"],"created_at":"2024-11-08T00:44:55.663Z","updated_at":"2025-07-23T02:04:18.902Z","avatar_url":"https://github.com/octu0.png","language":"Go","readme":"# `pch`\n\n[![MIT License](https://img.shields.io/github/license/octu0/pch)](https://github.com/octu0/pch/blob/master/LICENSE)\n[![GoDoc](https://pkg.go.dev/badge/github.com/octu0/pch)](https://pkg.go.dev/github.com/octu0/pch)\n[![Go Report Card](https://goreportcard.com/badge/github.com/octu0/pch)](https://goreportcard.com/report/github.com/octu0/pch)\n[![Releases](https://img.shields.io/github/v/release/octu0/pch)](https://github.com/octu0/pch/releases)\n\nGo implementation of [Power Consistent Hashing](https://arxiv.org/pdf/2307.12448.pdf) algorithm.\n\n## Installation\n\n```bash\ngo get github.com/octu0/pch\n```\n\n## Example\n\n```go\nimport (\n    \"hash/fnv\"\n\n    \"github.com/octu0/pch\"\n)\n\nfunc main() {\n    p := pch.New(512, fnv.New64()) // 512 buckets, hash function fnv.New64()\n    p.Hash(\"hello world\")\n}\n```\n\n## Benchmark\n\n```\n$ go test -bench=Benchmark .\ngoos: linux\ngoarch: amd64\npkg: github.com/octu0/pch\ncpu: Intel(R) Xeon(R) W-11955M CPU @ 2.60GHz\nBenchmark/jump/512-16           15240927                76.51 ns/op\nBenchmark/jump/1024-16          14898984                79.36 ns/op\nBenchmark/jump/2048-16          14624468                81.27 ns/op\nBenchmark/jump/4096-16          14171553                84.87 ns/op\nBenchmark/jump/8192-16          13739763                86.91 ns/op\nBenchmark/power/512-16           9934183               117.4 ns/op\nBenchmark/power/1024-16         10374721               119.1 ns/op\nBenchmark/power/2048-16         10252898               117.2 ns/op\nBenchmark/power/4096-16         10489959               118.0 ns/op\nBenchmark/power/8192-16         10361293               117.0 ns/op\nPASS\n```\n\n# License\n\nMIT, see LICENSE file for details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctu0%2Fpch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctu0%2Fpch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctu0%2Fpch/lists"}