{"id":15393606,"url":"https://github.com/mikdusan/benchmark.unicode","last_synced_at":"2025-10-06T17:05:39.373Z","repository":{"id":174352405,"uuid":"177880274","full_name":"mikdusan/benchmark.unicode","owner":"mikdusan","description":"A command-line tool written in Zig to measure the performance of various UTF8 decoders.","archived":false,"fork":false,"pushed_at":"2020-05-15T14:12:03.000Z","size":7231,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-03T23:27:26.592Z","etag":null,"topics":["benchmark","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/mikdusan.png","metadata":{"files":{"readme":".github/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-26T22:50:31.000Z","updated_at":"2022-03-23T07:56:43.000Z","dependencies_parsed_at":"2023-06-15T01:45:10.706Z","dependency_job_id":null,"html_url":"https://github.com/mikdusan/benchmark.unicode","commit_stats":{"total_commits":19,"total_committers":1,"mean_commits":19.0,"dds":0.0,"last_synced_commit":"fc1da16d2209123a122826004345af8dbe5b3c6d"},"previous_names":["mikdusan/benchmark.unicode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikdusan/benchmark.unicode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikdusan%2Fbenchmark.unicode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikdusan%2Fbenchmark.unicode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikdusan%2Fbenchmark.unicode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikdusan%2Fbenchmark.unicode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikdusan","download_url":"https://codeload.github.com/mikdusan/benchmark.unicode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikdusan%2Fbenchmark.unicode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278646783,"owners_count":26021512,"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-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["benchmark","zig"],"created_at":"2024-10-01T15:19:46.012Z","updated_at":"2025-10-06T17:05:39.354Z","avatar_url":"https://github.com/mikdusan.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"## benchmark.unicode\nA command-line tool written in Zig to measure the performance of various\nUTF8 decoders. The decoders are written in Zig or C.\n\n##### BUILD\n```\n$ git clone https://github.com/mikdusan/benchmark.unicode.git\n$ cd benchmark.unicode\n$ zig build install -Drelease-fast\n```\n\n##### RUN BENCHMARK\n```\n$ bin/bench -3 -m 10 -r 3 dat/wellons.dat\nreading 8.00 MiB UTF-8 test data 'dat/wellons.dat'...\nbenchmark: mikdusan.2 ----------------------------------------------------------------\n  ::  328.72 MiB/s, 80.00 MiB data, 33.61M codepoints, 0 errors\n  ::  326.96 MiB/s, 80.00 MiB data, 33.61M codepoints, 0 errors\n  ::  330.59 MiB/s, 80.00 MiB data, 33.61M codepoints, 0 errors\n\n  average rate:           328.75 MiB/s\n  total UTF8 data:        240.00 MiB\n  total UTF8 codepoints:  100.83M\n  total UTF8 errors:      0\n```\n\n##### USAGE\n```\n$ bin/bench --help\nusage: bin/bench [-0123456hl] [-mrsv] [file]\n\n Benchmark for various UTF-8 decoder implementations.\n\n -#      select benchmark case to perform (default: all)\n -m num  magnify data num-times within block (default: 1)\n -r num  repeat benchmark block num-times (default: 1)\n -s num  generate num MiB of random data (default: 1)\n -v      increase verbosity\n -l      list available benchmark cases and exit\n -h      display this help and exit\n```\n\n##### LIST BENCHMARK CASES\n```\n$ bin/bench -lv\n  ##  Benchmark Case\n  --  ---------------------------------------------------------------\n   0  hoehrmann\n      - DFA-based C implementation\n      - source: http://bjoern.hoehrmann.de/utf-8/decoder/dfa/\n  --  ---------------------------------------------------------------\n   1  mikdusan.0\n      - novice Zig implementation\n      - iterator returns EOF (via optional)\n      - iterator returns illegal encoding (via error union)\n      - algorithm similar to `wellons.simple`\n  --  ---------------------------------------------------------------\n   2  mikdusan.1\n      - delta from `mikdusan.0`\n      - iterator does NOT return EOF\n  --  ---------------------------------------------------------------\n   3  mikdusan.2\n      - delta from `mikdusan.0`\n      - iterator returns EOF (via overloaded codepoint private-use)\n      - iterator returns illegal encoding (via codepoint private-use)\n  --  ---------------------------------------------------------------\n   4  std.unicode\n      - Zig std.unicode implementation\n  --  ---------------------------------------------------------------\n   5  wellons.branchless\n      - branchless C implementation\n      - source: https://github.com/skeeto/branchless-utf8\n      - four-byte reads, buffer end requires +3 bytes zero-padding\n  --  ---------------------------------------------------------------\n   6  wellons.simple\n      - simple C implementation\n      - source: https://github.com/skeeto/branchless-utf8\n```\n\n##### ZIG/HOST INFORMATION\n```\n$ zig version\n0.4.0+4d8a6f6fe\n$ sw_vers \nProductName:\tMac OS X\nProductVersion:\t10.14.6\nBuildVersion:\t18G87\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikdusan%2Fbenchmark.unicode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikdusan%2Fbenchmark.unicode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikdusan%2Fbenchmark.unicode/lists"}