language-arena
language-arena is a performance benchmark of statically typed programming languages that compile to native code.
Example results 2016
Windows ( full report) | ||
Place | Language | Score |
1 | D | 50 |
2 | C++ | 35 |
3 | Go | 5 |
Example results 2015
Windows ( full report) | ||
Place | Language | Score |
1 | C++, D | 50 |
2 | Go | 0 |
Linux ( full report) | ||
Place | Language | Score |
1 | C++ | 50 |
2 | D | 40 |
3 | Go | 0 |
Getting up and running
Python is required to run the benchmark.
Update config.py
from the project's root by specifying paths to the compilers you are interested in.
Run the launcher script (./run.sh
or run.bat
).
Benchmarks
Simple benchmarks (quick-sort, reflections-math)
The goal of a simple benchmark is to perform basic sanity check. It is expected that compilers will produce executables with similar performance for simple benchmarks. If it's not the case then either compiler is not mature enough or architecture of programming language imposes limitations for generating high performance code even for simple scenarios.
Complex benchmarks (kdtree-construction, kdtree-raycast)
Complex benchmarks implement non-trivial algorithms. These benchmarks have higher chances to detect the influence of the language design on performance characteristics. They also provide an opportunity for the compilers to demonstrate their optimization skills.
Scoring
Benchmark Type | 1st place | 2nd place | >= 3rd place |
---|---|---|---|
simple | 10 points | 5 points | 0 points |
complex | 20 points | 10 points | 0 points |
Scoring is performed on a per-language basis. If the benchmark for particular language is compiled with multiple compilers then the fastest result is selected for scores calculation.
Maximum possible score = 10 + 10 + 20 + 20 = 60
Additionally per-language and per-compiler relative running times are computed.
Compiler notes
Linux support:
- C++: gcc, clang
- D: dmd, gdc, ldc
- Go: go, gccgo
Windows support:
- C++: msvc
- D: dmd, ldc
- Go : go
Where to get compilers?
- Visual Studio Community 2022: https://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx
- Dlang compilers: http://dlang.org/download.html
- Golang: https://golang.org/dl/