Benchmarks

Linux 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) 171.935ms 58.538ms 256.326ms
2 Rust 255.567ms 194.625ms 318.192ms
3 C (GCC) 278.961ms 215.421ms 378.663ms
4 C (Clang) 279.599ms 215.261ms 355.269ms
5 C++ (Clang++) 283.237ms 90.290ms 688.545ms
6 C++ (G++) 289.410ms 194.789ms 370.860ms
7 Go 337.154ms 232.383ms 472.425ms
8 JavaScript (Deno) 354.743ms 246.250ms 453.034ms
9 JavaScript (Node) 408.335ms 318.562ms 565.430ms
10 Java 443.945ms 154.424ms 828.445ms
11 GraalVM 523.188ms 407.590ms 676.224ms
12 Kotlin (JVM) 583.524ms 437.809ms 714.690ms
13 D 722.370ms 573.011ms 895.528ms
14 Zig 2,098.815ms 1,698.406ms 2,592.043ms
15 Ruby 2,399.110ms 2,021.152ms 2,853.493ms
16 Python 3,736.682ms 2,907.809ms 4,796.288ms
17 Kotlin (Native) 7,448.647ms 5,916.759ms 9,121.020ms
18 PHP 9,216.569ms 7,925.093ms 10,742.073ms

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times