Benchmarks

Benchmark: Bubble Sort

Bubble Sort is one of the simplest sorting algorithms that repeatedly swaps adjacent elements if they are incorrect. 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 Go 0.000µs 0.000µs 0.000µs
2 C (Clang) 8.988µs 8.000µs 9.800µs
3 C (GCC) 18.784µs 7.700µs 243.700µs
4 C++ (Clang++) 31.444µs 18.600µs 292.800µs
5 C++ (G++) 58.616µs 22.900µs 866.400µs
6 Java 82.612µs 65.900µs 143.900µs
7 PHP 184.552µs 152.600µs 525.300µs
8 Rust 184.584µs 101.600µs 1,879.800µs
9 Python 190.948µs 159.200µs 335.600µs
10 Kotlin (Native) 208.180µs 122.300µs 1,089.400µs
11 Ruby 251.016µs 201.000µs 564.400µs
12 JavaScript (Node) 265.832µs 216.800µs 826.900µs
13 JavaScript (Deno) 11,018.572µs 318.200µs 66,460.800µs
14 Kotlin (JVM) 11,155.948µs 1,852.500µs 120,819.600µs
15 JavaScript (Bun) 101,784.840µs 26,412.900µs 465,069.300µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times