Benchmarks

Mac Benchmark: 1,000 Random Numbers

Programs that generate 1,000 random numbers.

random 1K

All-Time Rankings

Rank Language Average Time Best Time Worst Time
1 C (GCC) 8.146µs 7.149µs 10.911µs
2 C (Clang) 8.378µs 7.460µs 12.116µs
3 C++ (G++) 8.400µs 7.000µs 11.000µs
4 C++ (Clang++) 10.232µs 7.991µs 45.368µs
5 Rust 13.120µs 7.000µs 136.000µs
6 Go 14.000µs 12.000µs 22.000µs
7 D 47.220µs 39.400µs 181.500µs
8 GraalVM 48.779µs 36.364µs 121.536µs
9 JavaScript (Deno) 83.342µs 65.068µs 131.420µs
10 PHP 84.462µs 68.819µs 217.133µs
11 Zig 136.000µs 116.000µs 267.000µs
12 Ruby 142.280µs 112.000µs 247.000µs
13 Python 173.360µs 135.000µs 363.000µs
14 JavaScript (Node) 188.664µs 52.033µs 3,225.801µs
15 Kotlin (Native) 439.829µs 261.091µs 2,534.096µs
16 Java 1,756.670µs 872.040µs 10,502.031µs
17 JavaScript (Bun) 23,247.753µs 127.153µs 567,221.702µs
18 Kotlin (JVM) 329,819.768µs 8,241.785µs 1,309,194.645µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times