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 Rust 17.246ms 11.029ms 34.502ms
2 C (Clang) 19.987ms 12.815ms 44.202ms
3 C++ (Clang++) 20.402ms 11.463ms 48.920ms
4 C++ (G++) 23.235ms 18.653ms 38.353ms
5 C (GCC) 37.376ms 17.945ms 205.047ms
6 Java 59.273ms 15.744ms 131.248ms
7 JavaScript (Node) 62.647ms 18.013ms 143.992ms
8 JavaScript (Deno) 75.201ms 19.242ms 249.983ms
9 Go 84.042ms 18.998ms 189.327ms
10 PHP 110.637ms 69.008ms 222.764ms
11 Kotlin (JVM) 173.575ms 43.062ms 676.321ms
12 JavaScript (Bun) 221.373ms 106.275ms 723.048ms
13 Ruby 259.156ms 151.032ms 350.382ms
14 Python 509.951ms 246.998ms 840.411ms
15 Kotlin (Native) 2,049.362ms 1,207.723ms 5,356.150ms

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times