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 Rust 8.200µs 8.000µs 9.000µs
2 C++ (G++) 8.600µs 8.000µs 10.000µs
3 C (GCC) 8.763µs 7.867µs 9.425µs
4 C (Clang) 9.185µs 8.609µs 11.276µs
5 C++ (Clang++) 10.596µs 8.668µs 43.418µs
6 Go 16.400µs 15.000µs 30.000µs
7 JavaScript (Node) 64.782µs 58.310µs 104.330µs
8 JavaScript (Deno) 74.250µs 70.446µs 80.844µs
9 PHP 78.506µs 73.821µs 94.462µs
10 Ruby 138.040µs 123.000µs 214.000µs
11 Python 239.040µs 151.000µs 1,293.000µs
12 Kotlin (Native) 833.946µs 264.484µs 9,160.043µs
13 Java 3,791.126µs 1,224.529µs 27,144.081µs
14 JavaScript (Bun) 32,989.129µs 136.961µs 798,992.651µs
15 Kotlin (JVM) 332,165.472µs 14,569.879µs 1,197,697.851µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times