{"id":17067754,"url":"https://github.com/rican7/bench-bintext-codecs","last_synced_at":"2026-03-02T00:34:02.135Z","repository":{"id":235088191,"uuid":"790026682","full_name":"Rican7/bench-bintext-codecs","owner":"Rican7","description":"Benchmarks of binary-to-text codecs (encoder/decoders) in Go.","archived":false,"fork":false,"pushed_at":"2024-04-25T08:18:39.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T23:32:26.080Z","etag":null,"topics":["benchmarks","codec","decoder","encoder","encoder-decoder","go","uuid"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rican7.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-04-22T06:09:25.000Z","updated_at":"2024-04-25T08:18:42.000Z","dependencies_parsed_at":"2024-04-25T09:33:36.102Z","dependency_job_id":null,"html_url":"https://github.com/Rican7/bench-bintext-codecs","commit_stats":null,"previous_names":["rican7/bench-bintext-codecs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Rican7/bench-bintext-codecs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rican7%2Fbench-bintext-codecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rican7%2Fbench-bintext-codecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rican7%2Fbench-bintext-codecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rican7%2Fbench-bintext-codecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rican7","download_url":"https://codeload.github.com/Rican7/bench-bintext-codecs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rican7%2Fbench-bintext-codecs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29988054,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T22:42:38.399Z","status":"ssl_error","status_checked_at":"2026-03-01T22:41:51.863Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["benchmarks","codec","decoder","encoder","encoder-decoder","go","uuid"],"created_at":"2024-10-14T11:11:33.481Z","updated_at":"2026-03-02T00:34:02.115Z","avatar_url":"https://github.com/Rican7.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bench-bintext-codecs\n\n_Benchmarks of binary-to-text codecs (encoder/decoders) in Go._\n\n\n## Why?\n\nHonestly, I've been reading so much about different kinds of k-sortable, unique IDs for entities/resources, and the different encodings to use for different reasons (length, case-sensitivty, etc), that I wondered if any of the well-known implementations (in Go) had any performance benefits, and decided to benchmark them.\n\nWill this be the bottleneck of your app? Nah, most likely not, but it was a fun exploration nonetheless.\n\n(Oh, and the name... I might come back and benchmark some values other than just UUIDs... so I kept it generic enough... whatever.)\n\n\n## Benchmark Results\n\nHere's the results of the benchmarking on my machine, but I'd suggest to run the benchmarks yourself:\n\n```\n$ uname -r\n4.4.0-22621-Microsoft\n$ go test -bench=. -benchmem ./...\ngoos: linux\ngoarch: amd64\npkg: github.com/Rican7/bench-bintext-codecs/internal/uuid\ncpu: AMD Ryzen 9 3900X 12-Core Processor\nBenchmarkDefaultString/Encode-24                          222081              5281 ns/op            4800 B/op        100 allocs/op\nBenchmarkDefaultString/Decode-24                          422239              2825 ns/op               0 B/op          0 allocs/op\nBenchmarkBase64Std/Encode-24                              176221              6757 ns/op            4800 B/op        200 allocs/op\nBenchmarkBase64Std/Decode-24                              205936              5609 ns/op            2400 B/op        100 allocs/op\nBenchmarkBase64RawURLPrePadded/Encode-24                  115084              9987 ns/op            7200 B/op        300 allocs/op\nBenchmarkBase64RawURLPrePadded/Decode-24                  189194              6037 ns/op            1600 B/op        100 allocs/op\nBenchmarkBase32Std/Encode-24                              157074              7597 ns/op            6400 B/op        200 allocs/op\nBenchmarkBase32Std/Decode-24                              117090             10083 ns/op            3200 B/op        100 allocs/op\nBenchmarkBase32HexPrePadded/Encode-24                     110527             10156 ns/op            8800 B/op        300 allocs/op\nBenchmarkBase32HexPrePadded/Decode-24                     120002              9780 ns/op            3200 B/op        100 allocs/op\nBenchmarkStdLibCrockfordBase32/Encode-24                  111487             10254 ns/op            8800 B/op        300 allocs/op\nBenchmarkStdLibCrockfordBase32/Decode-24                  123644              9691 ns/op            3200 B/op        100 allocs/op\nBenchmarkULIDV2CrockfordBase32/Encode-24                  258001              4548 ns/op            3200 B/op        100 allocs/op\nBenchmarkULIDV2CrockfordBase32/Decode-24                  713817              1611 ns/op               0 B/op          0 allocs/op\nBenchmarkTypeIDCrockfordBase32/Encode-24                  268118              4326 ns/op            3200 B/op        100 allocs/op\nBenchmarkTypeIDCrockfordBase32/Decode-24                  258442              4367 ns/op            1600 B/op        100 allocs/op\nBenchmarkShortUUIDV3/Encode-24                              2404            488037 ns/op          268217 B/op      11255 allocs/op\nBenchmarkShortUUIDV3/Decode-24                              2490            451558 ns/op           40962 B/op       3604 allocs/op\nBenchmarkShortUUIDV4/Encode-24                              2616            441826 ns/op          263489 B/op       9758 allocs/op\nBenchmarkShortUUIDV4/Decode-24                              6142            184262 ns/op           18386 B/op        800 allocs/op\nBenchmarkBTCBase58/Encode-24                                7912            139247 ns/op           31640 B/op       2560 allocs/op\nBenchmarkBTCBase58/Decode-24                               10000            115170 ns/op           20000 B/op        800 allocs/op\nPASS\nok      github.com/Rican7/bench-bintext-codecs/internal/uuid    26.839s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frican7%2Fbench-bintext-codecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frican7%2Fbench-bintext-codecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frican7%2Fbench-bintext-codecs/lists"}