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 C++ (G++) 9.224ms 8.104ms 13.239ms
2 Go 11.502ms 9.329ms 38.874ms
3 C (GCC) 23.722ms 8.003ms 387.225ms
4 C++ (Clang++) 28.427ms 7.863ms 508.775ms
5 Rust 37.079ms 7.644ms 730.746ms
6 C (Clang) 52.879ms 8.478ms 660.288ms
7 JavaScript (Bun) 64.265ms 6.533ms 567.187ms
8 JavaScript (Deno) 502.800ms 11.870ms 2,961.282ms
9 PHP 600.222ms 62.099ms 2,084.758ms
10 Kotlin (JVM) 646.603ms 30.468ms 2,013.022ms
11 Java 740.195ms 21.398ms 1,792.385ms
12 JavaScript (Node) 808.316ms 14.599ms 2,509.839ms
13 Ruby 1,726.542ms 105.446ms 2,811.873ms
14 Python 2,477.818ms 1,268.080ms 4,136.355ms
15 Kotlin (Native) 4,268.115ms 2,481.660ms 7,440.844ms

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times