Benchmarks

Benchmark: 1,000,000 Random Numbers

Programs that generate 1,000,000 random numbers.

random 1M

All-Time Rankings

Rank Language Average Time Best Time Worst Time
1 JavaScript (Bun) 150.984ms 99.647ms 236.415ms
2 C++ (Clang++) 208.692ms 132.081ms 287.404ms
3 C (GCC) 224.697ms 144.595ms 277.000ms
4 C (Clang) 232.503ms 165.821ms 298.687ms
5 C++ (G++) 242.432ms 170.893ms 300.500ms
6 Rust 252.228ms 176.517ms 339.499ms
7 Java 308.418ms 78.041ms 435.251ms
8 Go 338.256ms 270.689ms 470.799ms
9 JavaScript (Node) 360.397ms 237.506ms 490.014ms
10 JavaScript (Deno) 363.260ms 299.308ms 447.027ms
11 Kotlin (JVM) 681.108ms 483.341ms 1,056.799ms
12 Ruby 2,457.296ms 2,000.817ms 2,987.712ms
13 Python 3,822.500ms 3,228.854ms 4,807.064ms
14 Kotlin (Native) 6,150.351ms 5,296.915ms 6,974.641ms
15 PHP 8,370.381ms 5,868.612ms 11,411.693ms

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times