Benchmarks

Benchmark: Count to 1 Million

Programs that count to 1 million

number count 1M

All-Time Rankings

Rank Language Average Time Best Time Worst Time
1 C++ (G++) 1.801ms 1.742ms 1.949ms
2 C++ (Clang++) 1.872ms 1.732ms 2.261ms
3 Go 3.719ms 1.694ms 45.132ms
4 JavaScript (Deno) 4.261ms 2.652ms 19.043ms
5 Kotlin (JVM) 6.733ms 2.897ms 20.484ms
6 C (Clang) 12.484ms 1.731ms 267.060ms
7 C (GCC) 16.864ms 1.735ms 377.834ms
8 Kotlin (Native) 18.607ms 2.651ms 347.837ms
9 Rust 27.121ms 5.903ms 520.970ms
10 JavaScript (Node) 43.209ms 2.430ms 1,011.329ms
11 JavaScript (Bun) 78.695ms 3.667ms 841.294ms
12 Java 89.225ms 2.211ms 1,011.626ms
13 PHP 125.591ms 19.949ms 1,260.001ms
14 Ruby 1,163.951ms 62.227ms 2,240.482ms
15 Python 2,054.189ms 1,284.017ms 3,520.336ms

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times