Benchmarks

Windows 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) 6.568µs 6.000µs 7.500µs
2 C (Clang) 12.288µs 7.700µs 102.600µs
3 GraalVM 29.316µs 7.800µs 464.400µs
4 C++ (Clang++) 33.068µs 27.300µs 55.400µs
5 D 46.912µs 37.300µs 79.000µs
6 Java 53.132µs 45.600µs 114.500µs
7 C++ (G++) 110.224µs 38.900µs 1,320.300µs
8 Rust 110.284µs 82.400µs 350.300µs
9 PHP 112.460µs 96.100µs 152.900µs
10 Go 151.756µs 0.000µs 3,793.900µs
11 Ruby 159.268µs 123.700µs 295.100µs
12 Python 173.380µs 126.800µs 852.000µs
13 JavaScript (Node) 357.844µs 275.700µs 864.100µs
14 JavaScript (Deno) 358.768µs 212.699µs 2,785.199µs
15 Kotlin (Native) 514.692µs 367.800µs 1,533.800µs
16 Zig 515.520µs 346.500µs 2,050.700µs
17 Kotlin (JVM) 12,294.984µs 1,977.800µs 155,255.300µs
18 JavaScript (Bun) 143,588.412µs 60,431.500µs 385,673.700µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times