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 (GCC) 1.285ms 0.895ms 3.969ms
2 C (Clang) 1.551ms 0.996ms 4.062ms
3 C++ (Clang++) 2.099ms 1.423ms 9.653ms
4 C++ (G++) 2.148ms 1.283ms 4.723ms
5 Kotlin (Native) 4.471ms 3.361ms 10.993ms
6 Kotlin (JVM) 13.392ms 3.182ms 101.452ms
7 JavaScript (Node) 17.967ms 2.644ms 72.269ms
8 Rust 18.455ms 9.795ms 74.433ms
9 Java 19.863ms 2.367ms 200.037ms
10 JavaScript (Deno) 24.938ms 2.318ms 103.558ms
11 Go 28.730ms 1.996ms 318.827ms
12 PHP 65.377ms 30.485ms 112.549ms
13 JavaScript (Bun) 174.227ms 55.300ms 404.463ms
14 Ruby 180.240ms 99.950ms 626.971ms
15 Python 384.556ms 253.377ms 614.036ms

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times