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) 5.220µs 4.785µs 6.682µs
2 C (Clang) 5.762µs 5.479µs 6.160µs
3 Go 38.000µs 29.000µs 95.000µs
4 C++ (G++) 41.280µs 38.000µs 57.000µs
5 C++ (Clang++) 48.548µs 46.517µs 57.473µs
6 Kotlin (Native) 52.923µs 45.510µs 140.281µs
7 Rust 59.360µs 56.000µs 65.000µs
8 Java 88.445µs 58.201µs 504.718µs
9 PHP 135.809µs 122.027µs 272.280µs
10 Python 148.360µs 125.000µs 519.000µs
11 JavaScript (Deno) 254.597µs 229.346µs 415.516µs
12 Ruby 305.000µs 117.000µs 4,325.000µs
13 JavaScript (Node) 356.776µs 228.555µs 3,007.599µs
14 JavaScript (Bun) 15,953.529µs 433.254µs 361,333.090µs
15 Kotlin (JVM) 32,401.991µs 1,376.873µs 748,343.815µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times