{"id":17501929,"url":"https://github.com/itsdoot/varint-benchmark","last_synced_at":"2025-03-28T19:23:12.480Z","repository":{"id":119858957,"uuid":"398753823","full_name":"ItsDoot/varint-benchmark","owner":"ItsDoot","description":"A rendition of https://steinborn-me.pages.dev/posts/performance/how-fast-can-you-write-a-varint/ but in Rust this time.","archived":false,"fork":false,"pushed_at":"2021-08-22T20:51:15.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T20:52:30.191Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/ItsDoot.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,"publiccode":null,"codemeta":null}},"created_at":"2021-08-22T08:47:15.000Z","updated_at":"2021-08-22T20:51:18.000Z","dependencies_parsed_at":"2023-06-03T10:00:36.508Z","dependency_job_id":null,"html_url":"https://github.com/ItsDoot/varint-benchmark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsDoot%2Fvarint-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsDoot%2Fvarint-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsDoot%2Fvarint-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ItsDoot%2Fvarint-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ItsDoot","download_url":"https://codeload.github.com/ItsDoot/varint-benchmark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246086054,"owners_count":20721287,"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-10-19T20:33:15.975Z","updated_at":"2025-03-28T19:23:12.437Z","avatar_url":"https://github.com/ItsDoot.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VarInt Encoding Benchmark\n\nThis repo was inspired by https://steinborn-me.pages.dev/posts/performance/how-fast-can-you-write-a-varint/ but using Rust rather than Java.\n\n# Results\n\nAll benchmarks were performed with a Ryzen 1700 CPU.\n\n```\ntest tests::blended  ... bench:   3,059,360 ns/iter (+/- 21,405)\ntest tests::bungee   ... bench:   7,298,080 ns/iter (+/- 309,710)\ntest tests::lucky5   ... bench:   2,479,300 ns/iter (+/- 15,811)\ntest tests::velocity ... bench:   6,171,420 ns/iter (+/- 158,624)\n```\n\n## What about an array?\n\nI was curious what the differences are with using an `[u8; 5]` array as the write buffer rather than a `Vec\u003cu8\u003e`. This was the outcome:\n\n```\ntest tests::blended  ... bench:   2,017,167 ns/iter (+/- 305,102)\ntest tests::bungee   ... bench:   2,504,040 ns/iter (+/- 60,773)\ntest tests::lucky5   ... bench:      45,386 ns/iter (+/- 9,554)\ntest tests::velocity ... bench:   7,023,560 ns/iter (+/- 58,624)\n```\n\nLucky5 is orders of magnitude faster? And the bungee writer now surpasses velocity's old writer?\n\nThe array version is found in the `arrays` branch.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsdoot%2Fvarint-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitsdoot%2Fvarint-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitsdoot%2Fvarint-benchmark/lists"}