Benchmarks

Linux 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 11.207µs 10.509µs 12.453µs
2 C++ (Clang++) 13.882µs 12.413µs 32.250µs
3 C (GCC) 15.099µs 13.565µs 16.331µs
4 C (Clang) 16.233µs 14.598µs 30.026µs
5 Go 21.966µs 19.877µs 23.153µs
6 GraalVM 46.008µs 29.185µs 343.745µs
7 Zig 114.884µs 99.917µs 141.486µs
8 JavaScript (Deno) 254.323µs 93.576µs 2,744.110µs
9 JavaScript (Bun) 908.070µs 337.624µs 13,595.421µs
10 Kotlin (Native) 1,605.605µs 322.495µs 16,359.267µs
11 D 1,725.484µs 31.800µs 42,337.100µs
12 C++ (G++) 1,880.293µs 11.211µs 46,685.944µs
13 JavaScript (Node) 3,157.933µs 77.736µs 41,165.919µs
14 Ruby 3,243.818µs 116.789µs 77,955.334µs
15 Python 4,491.517µs 154.009µs 75,293.119µs
16 PHP 7,826.930µs 417.624µs 52,519.558µs
17 Java 29,817.687µs 851.388µs 78,762.166µs
18 Kotlin (JVM) 271,326.478µs 188,255.350µs 378,404.661µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times