Benchmarks

Mac Benchmark: Merge Sort

Merge Sort is a sorting algorithm that divides-and-conquers by recursively dividing the array into two halves until each sub-array has only one element. This benchmark measures the time it takes to sort an array of 50 unsorted numbers. Implementation modified from GeeksForGeeks.

number algorithm

All-Time Rankings

Rank Language Average Time Best Time Worst Time
1 C (GCC) 5.219µs 4.344µs 12.364µs
2 C (Clang) 5.370µs 4.902µs 7.435µs
3 GraalVM 6.049µs 4.950µs 10.281µs
4 Kotlin (Native) 36.736µs 31.419µs 50.367µs
5 C++ (G++) 38.880µs 35.000µs 65.000µs
6 C++ (Clang++) 51.031µs 42.308µs 95.743µs
7 Rust 70.600µs 53.000µs 215.000µs
8 Java 78.631µs 53.269µs 360.362µs
9 D 83.912µs 72.200µs 134.800µs
10 PHP 108.641µs 101.192µs 145.991µs
11 Python 152.640µs 112.000µs 460.000µs
12 Go 217.040µs 26.000µs 4,584.000µs
13 JavaScript (Deno) 232.277µs 202.616µs 441.946µs
14 JavaScript (Node) 260.686µs 226.247µs 382.274µs
15 Ruby 357.320µs 214.000µs 957.000µs
16 Zig 384.640µs 302.000µs 775.000µs
17 Kotlin (JVM) 5,072.409µs 1,527.206µs 66,399.122µs
18 JavaScript (Bun) 62,304.766µs 420.989µs 635,012.797µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times