Benchmarks

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.312µs 5.600µs 6.700µs
2 C (Clang) 6.400µs 5.900µs 6.900µs
3 C++ (Clang++) 35.756µs 29.100µs 97.800µs
4 Java 49.636µs 45.600µs 72.000µs
5 C++ (G++) 86.532µs 32.700µs 642.700µs
6 PHP 132.732µs 102.500µs 249.400µs
7 Go 155.516µs 0.000µs 1,368.500µs
8 Python 184.752µs 137.300µs 1,039.700µs
9 Ruby 217.112µs 128.100µs 1,485.700µs
10 Rust 217.308µs 87.100µs 1,959.100µs
11 JavaScript (Deno) 372.644µs 237.700µs 2,401.000µs
12 Kotlin (Native) 1,343.712µs 602.000µs 14,639.200µs
13 JavaScript (Node) 1,907.616µs 276.900µs 39,491.200µs
14 Kotlin (JVM) 3,295.896µs 1,980.400µs 26,541.700µs
15 JavaScript (Bun) 179,988.288µs 41,073.300µs 500,499.900µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times