{"id":19182045,"url":"https://github.com/glentner/1brc-awk","last_synced_at":"2026-06-03T16:31:16.463Z","repository":{"id":218651936,"uuid":"747001575","full_name":"glentner/1brc-awk","owner":"glentner","description":"Solutions to 1BRC in AWK","archived":false,"fork":false,"pushed_at":"2024-01-23T04:39:05.000Z","size":3,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-23T02:25:16.087Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/glentner.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}},"created_at":"2024-01-23T04:03:47.000Z","updated_at":"2024-04-14T20:21:12.000Z","dependencies_parsed_at":"2024-01-23T05:43:12.180Z","dependency_job_id":null,"html_url":"https://github.com/glentner/1brc-awk","commit_stats":null,"previous_names":["glentner/1brc-awk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/glentner/1brc-awk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glentner%2F1brc-awk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glentner%2F1brc-awk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glentner%2F1brc-awk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glentner%2F1brc-awk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glentner","download_url":"https://codeload.github.com/glentner/1brc-awk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glentner%2F1brc-awk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33874679,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"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":[],"created_at":"2024-11-09T10:56:20.456Z","updated_at":"2026-06-03T16:31:16.442Z","avatar_url":"https://github.com/glentner.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"1brc-awk\n========\n\nSolution(s) to [1BRC](https://1brc.dev) in _Awk_.\n\nThe naive solution (single-threaded) in many common languages are very slow.\nI wanted to see how a pure Awk solution would compare.\n\nAll of my tests were run on\na high-performance server (Two AMD Epyc 7763 “Milan” CPUs @ 2.2GHz) on top of\na high-performance Lustre file system (100 Gbps HDR Infiniband interconnect).\n\nI can stream `measurements.txt` in ~2 seconds.\nAll decent multi-threaded solutions run in ~5-10 seconds.\n\nI haven't included them here because I'm comparing the typical naive approach\nyou would expect out of any of these without any special tricks or parallelism.\n\n* CPython in ~12 minutes\n* Java, Kotlin, Awk in ~10 minutes\n* C++, Rust in ~7 minutes\n\nIf comparing the _purest_, _naive_ approach, Awk seems to win out, with\nthe simplest expression of logic. However, it is still horrendously slow\ncompared to any multi-threaded approach or modest optimization in any other\nlanguage.\n\nAttempts to use something like `split` and/or `parallel --pipe` allow\nfor multiple parallel Awk jobs with a combine phase at the end.\n\nThe trival SQL implementation executed with DuckDB finishes in ~3 seconds.\nWritten in C++, automatically parallel. A quality multi-threaded solution\nwritten in Rust finishes in ~5 seconds.\n\nThis was fun to see how it would compare.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglentner%2F1brc-awk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglentner%2F1brc-awk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglentner%2F1brc-awk/lists"}