{"id":15412277,"url":"https://github.com/robthree/ascii-benchmark","last_synced_at":"2026-05-01T10:31:39.959Z","repository":{"id":69245660,"uuid":"282453847","full_name":"RobThree/ASCII-Benchmark","owner":"RobThree","description":"Inspired by \"Avoid character-by-character processing when performance matters\"","archived":false,"fork":false,"pushed_at":"2020-07-26T13:38:52.000Z","size":76788,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T03:15:49.955Z","etag":null,"topics":["ascii","benchmark","csharp","dotnet","dotnetcore31"],"latest_commit_sha":null,"homepage":"https://lemire.me/blog/2020/07/21/avoid-character-by-character-processing-when-performance-matters/","language":"C#","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/RobThree.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":"2020-07-25T13:54:00.000Z","updated_at":"2020-07-26T13:38:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"2056c4a0-355c-4555-9485-6a0ed3172e31","html_url":"https://github.com/RobThree/ASCII-Benchmark","commit_stats":{"total_commits":11,"total_committers":1,"mean_commits":11.0,"dds":0.0,"last_synced_commit":"18c62a9e57be9106585ae9843c85d493fa42d148"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RobThree/ASCII-Benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobThree%2FASCII-Benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobThree%2FASCII-Benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobThree%2FASCII-Benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobThree%2FASCII-Benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RobThree","download_url":"https://codeload.github.com/RobThree/ASCII-Benchmark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RobThree%2FASCII-Benchmark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32494270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"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":["ascii","benchmark","csharp","dotnet","dotnetcore31"],"created_at":"2024-10-01T16:52:07.321Z","updated_at":"2026-05-01T10:31:39.942Z","avatar_url":"https://github.com/RobThree.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ASCII-Benchmark\nInspired by https://lemire.me/blog/2020/07/21/avoid-character-by-character-processing-when-performance-matters/\n\nTest strings in the files `allCountries.txt.gz` and `cities500.txt.gz` are [sourced from Geonames.org](https://download.geonames.org/export/dump/) where I have extracted the second column (`name`) of the corresponding files. The `enwik8.gz` file is sourced from [The Large Text Compression Benchmark](http://mattmahoney.net/dc/textdata.html). Testfiles have been gzipped in order to save space. These files have a nice mix of ASCII / non-ASCII data.\n\n# Results\n\n## Intel Core i9-10900X:\n\n    Benching allCountries.txt.gz\n            Lines           : 7,522,986\n            Avg. length     : 14.58\n            Max. length     : 151\n            Non-Ascii lines : 23.52 %\n    Measuring methods... please be patient...\n    Regex           Avg: 1.1677s    Min: 1.1001s    Max: 1.2178s       6,442,421 strings/sec\n    Branchy1        Avg: 0.0552s    Min: 0.0497s    Max: 0.0581s     136,181,375 strings/sec\n    Branchy2        Avg: 0.0533s    Min: 0.0481s    Max: 0.0615s     141,014,802 strings/sec\n    Branchless      Avg: 0.0561s    Min: 0.0519s    Max: 0.0584s     134,095,915 strings/sec\n    Hybrid          Avg: 0.0518s    Min: 0.0483s    Max: 0.0553s     145,139,683 strings/sec\n\n    Benching cities500.txt.gz\n            Lines           : 165,957\n            Avg. length     : 10.14\n            Max. length     : 65\n            Non-Ascii lines : 20.12 %\n    Measuring methods... please be patient...\n    Regex           Avg: 0.0224s    Min: 0.0218s    Max: 0.0231s       7,404,511 strings/sec\n    Branchy1        Avg: 0.0011s    Min: 0.0008s    Max: 0.0013s     152,820,546 strings/sec\n    Branchy2        Avg: 0.0011s    Min: 0.0008s    Max: 0.0013s     152,532,605 strings/sec\n    Branchless      Avg: 0.0011s    Min: 0.0009s    Max: 0.0013s     148,741,642 strings/sec\n    Hybrid          Avg: 0.0012s    Min: 0.0008s    Max: 0.0015s     142,158,282 strings/sec\n\n    Benching enwik8.gz\n            Lines           : 1,128,024\n            Avg. length     : 87.32\n            Max. length     : 4,173\n            Non-Ascii lines : 6.35 %\n    Measuring methods... please be patient...\n    Regex           Avg: 0.2885s    Min: 0.2559s    Max: 0.3619s       3,910,404 strings/sec\n    Branchy1        Avg: 0.0163s    Min: 0.0158s    Max: 0.0173s      69,345,382 strings/sec\n    Branchy2        Avg: 0.0150s    Min: 0.0141s    Max: 0.0168s      75,191,574 strings/sec\n    Branchless      Avg: 0.0160s    Min: 0.0156s    Max: 0.0164s      70,479,739 strings/sec\n    Hybrid          Avg: 0.0141s    Min: 0.0134s    Max: 0.0151s      80,107,376 strings/sec","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobthree%2Fascii-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobthree%2Fascii-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobthree%2Fascii-benchmark/lists"}