Which Programming Language Wins a 10 Billion Loop Test? Insights from a Community Benchmark
Ben Dicken conducted a massive benchmark running 10 billion nested loops across many languages—Zig, Julia, Perl, Elixir, Fortran, C#, Lua, and more—while the community contributed optimizations such as goroutine‑based Go improvements, sparking discussions on fair measurement, startup overhead, and concurrency advantages.
Ben Dicken (@BenjDicken) performed a test that executed a double loop of 10 000 × 100 000 = 1 billion iterations to compare the speed of various programming languages, and created an animated GIF to illustrate the results.
Enthusiastic developers contributed implementations in many languages, including Zig, Julia, Perl, Elixir, Fortran, C#, Lua, and others, while also discussing how to optimise the code.
One notable contribution was a pull request by dolanor titled “optimize go loops with goroutine”, arguing that Go’s strength lies in concurrent programming and that its single‑threaded performance cannot match that of C or Rust without using goroutines.
Brandon‑T highlighted issues with the existing benchmark, emphasizing that measurements should exclude program startup, printing, and other unrelated overhead, focusing solely on the execution time of the code itself.
The author notes that reading through the entire issue felt like a refreshing diversion similar to the 1BRC challenge, offering an opportunity to learn performance‑optimisation techniques and collaborate with developers worldwide, and hopes for more such activities.
References
[1] @BenjDicken: https://x.com/@BenjDicken
[2] Test repository: https://github.com/bddicken/languages
[3] dolanor: https://github.com/dolanor
[4] Pull request “optimize go loops with goroutine”: https://github.com/bddicken/languages/pull/86
[5] Brandon‑T: https://github.com/Brandon-T
[6] Benchmark Issues discussion: https://github.com/bddicken/languages/issues/71
[7] One‑Billion‑Row Challenge: https://www.morling.dev/blog/one-billion-row-challenge/
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
