The Computer Language
25.02 Benchmarks Game

Measured : Which programming language is fastest?


My question is if anyone here has any experience with simplistic benchmarking and could tell me which things to test for in order to get a simple idea of each language's general performance?

Time to Solve TTS. Is that lowest Elapsed Time or lowest CPU Time or mean CPU Time? (How many samples per program?) Optimized, Un-optimized or Goldilocks programs. Are the measurements reliable?


There's more than one right answer —

Answer for a few un-optimised fannkuch-redux programs —


Un-optimised single-thread #8 programs transliterated line-by-line literal style into different programming languages from the same original.

  source code secs mem gz    
  C gcc #8 39.34 2,343 483    
  Java #8 44.98 60,264 517    
  Node.js #8 58.20 63,136 452    
  PHP #8 28 min 16,335 477    
  Ruby yjit #8 34 min 17,691 418    
  Python 3 #8 40 min 11,874 414    

Or choose your answer for Rust and Julia and Haskell and … crowd sourced fannkuch-redux programs.

Answer for the fastest 200 contributed programs —


Eight simple tasks. A couple of dozen different programming languages. Altogether about 200 programs that are faster than the other crowd-sourced same-language-implementation programs.

Explore the measurements with box plot charts — medians, dispersion, skew.


Benchmark program elapsed seconds compared to the fastest for more programming language implementations.

The median-line for some language implementation groups seems to fall outside the IQR box for other groups. Choose your answer for likely differences between the groups.

Answer for A versus B —


Side-by-side comparison tables for the most popular searches.

Differences in approach — to memory management, parallel programming, regex, arbitrary precision arithmetic, implementation technique — are part and parcel of using different programming languages.

Choose your answer for the particular comparison that interests you.


Sitemap —

more-similar less-idiosyncratic
energy efficiency
n-body in-process measurements
JVM startup & warmup
box plot charts
a history
how programs are measured
toy programs
project repo
license
   
fannkuch-redux
n-body
spectral-norm
mandelbrot
fasta
k-nucleotide
   
reverse-complement
binary-trees
pidigits
regex-redux
   
Ada  
  C gcc
C gcc  
  Ada
  Intel C
  C clang
  C++ g++
  Intel Fortran
  Free Pascal
  Rust
Intel C  
  C gcc
  C clang
  Rust
C clang  
  Chapel
  C gcc
  Intel C
  Haskell GHC
  Julia
  Lisp SBCL
  OCaml
  Rust
  Swift
Chapel  
  C clang
  Intel Fortran
  Julia
C++ g++  
  C gcc
  C# naot
  C# 
  Go
  Java
  Java naot
  Rust
  Swift
C# naot  
  C++ g++
  C# 
  Go
  Swift
C#   
  C++ g++
  C# naot
  F# 
  Go
  Java naot
  JavaScript Node.js
  Swift
Dart  
  Dart jit
  JavaScript Node.js
Dart jit  
  Dart
Erlang  
  JavaScript Node.js
  Python
  Ruby
Intel Fortran  
  C gcc
  Chapel
  Julia
F#   
  C# 
  OCaml
Go  
  C++ g++
  C# naot
  C# 
  Java
  Java naot
  JavaScript Node.js
  Rust
  Swift
Haskell GHC  
  C clang
Java  
  C# 
  C++ g++
  Go
  Java -Xint
  Java naot
  JavaScript Node.js
  Swift
Java -Xint  
  Java
  Python
Java naot  
  C++ g++
  C# 
  Java
JavaScript  
  C gcc
  C# 
  Dart
  Erlang
  Java
  Lua
  Ruby yjit
  Rust
Julia  
  Chapel
  C clang
  Intel Fortran
Lisp SBCL  
  C clang
  Racket
Lua  
  JavaScript Node.js
  Perl
  Python
  Ruby
OCaml  
  C clang
  F# 
Free Pascal  
  C gcc
Perl  
  Lua
  Ruby
PHP  
  Java
  Python
  Ruby
Python  
  C++ g++
  Erlang
  Go
  Java
  Java -Xint
  JavaScript Node.js
  Lua
  PHP
  Ruby
Racket  
  Lisp SBCL
Ruby  
  Erlang
  JavaScript Node.js
  Lua
  Perl
  PHP
  Python
Rust  
  C clang
  C gcc
  Intel C
  C++ g++
  Go
  JavaScript Node.js
  Swift
Pharo Smalltalk  
  Python
Swift  
  C clang
  C++ g++
  C# naot
  C# 
  Go
  Java
  Rust
Toit  
  Micro Python