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) | 7.127µs | 5.420µs | 32.782µs |
2 | C (Clang) | 8.022µs | 7.143µs | 9.177µs |
3 | Go | 20.603µs | 17.684µs | 27.100µs |
4 | C++ (Clang++) | 29.076µs | 26.210µs | 31.830µs |
5 | Java | 1,326.662µs | 46.327µs | 31,865.143µs |
6 | JavaScript (Deno) | 1,545.821µs | 217.810µs | 32,520.304µs |
7 | Rust | 1,735.175µs | 43.230µs | 42,264.498µs |
8 | Ruby | 2,186.246µs | 113.323µs | 47,630.301µs |
9 | Python | 2,493.934µs | 121.359µs | 59,181.523µs |
10 | C++ (G++) | 2,950.871µs | 23.814µs | 73,135.082µs |
11 | JavaScript (Node) | 3,640.743µs | 275.086µs | 42,767.258µs |
12 | Kotlin (Native) | 6,384.775µs | 792.277µs | 41,886.959µs |
13 | PHP | 12,589.086µs | 491.462µs | 58,604.278µs |
14 | JavaScript (Bun) | 21,807.522µs | 862.929µs | 86,099.075µs |
15 | Kotlin (JVM) | 42,958.199µs | 1,444.711µs | 113,858.367µs |