Benchmarks

Mac Benchmark: Array Assignment (1K)

Assigns 1,000 elements to an array.

array 1K

All-Time Rankings

Rank Language Average Time Best Time Worst Time
1 D 0.600µs 0.500µs 1.000µs
2 C++ (G++) 1.680µs 1.000µs 2.000µs
3 C (GCC) 1.761µs 1.663µs 2.063µs
4 C (Clang) 1.858µs 1.685µs 2.219µs
5 C++ (Clang++) 1.998µs 1.720µs 2.358µs
6 GraalVM 2.683µs 2.173µs 3.377µs
7 Zig 3.120µs 2.000µs 6.000µs
8 Go 4.000µs 3.000µs 6.000µs
9 Rust 7.400µs 6.000µs 10.000µs
10 Java 8.950µs 7.958µs 13.500µs
11 PHP 57.276µs 49.095µs 120.060µs
12 Kotlin (Native) 74.219µs 61.596µs 132.267µs
13 JavaScript (Deno) 86.016µs 79.461µs 114.266µs
14 JavaScript (Node) 100.016µs 67.161µs 307.171µs
15 Ruby 201.280µs 168.000µs 403.000µs
16 Python 432.680µs 302.000µs 1,353.000µs
17 JavaScript (Bun) 815.296µs 117.617µs 11,627.716µs
18 Kotlin (JVM) 49,057.875µs 611.492µs 1,165,522.948µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times