Benchmarks

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++ (G++) 11.052µs 9.758µs 11.932µs
2 C++ (Clang++) 11.360µs 10.019µs 16.040µs
3 Rust 11.627µs 10.209µs 13.185µs
4 C (GCC) 13.784µs 12.173µs 30.728µs
5 Go 23.541µs 22.111µs 24.776µs
6 JavaScript (Deno) 110.564µs 86.212µs 134.081µs
7 C (Clang) 1,200.256µs 12.654µs 29,639.028µs
8 JavaScript (Node) 2,058.451µs 83.417µs 34,159.440µs
9 Kotlin (Native) 2,105.059µs 278.012µs 32,328.167µs
10 Ruby 2,129.225µs 126.027µs 45,055.348µs
11 Python 3,008.092µs 157.817µs 59,392.407µs
12 JavaScript (Bun) 7,493.607µs 365.476µs 36,538.791µs
13 PHP 11,768.542µs 416.421µs 67,529.823µs
14 Java 17,974.122µs 820.269µs 74,251.828µs
15 Kotlin (JVM) 382,486.454µs 273,094.924µs 474,443.283µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times