Benchmarks

Windows 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 GraalVM 8.292µs 6.700µs 9.400µs
3 C (GCC) 10.676µs 8.300µs 30.900µs
4 C++ (Clang++) 20.044µs 18.800µs 20.700µs
5 C++ (G++) 25.752µs 23.000µs 29.400µs
6 C (Clang) 27.412µs 7.900µs 473.700µs
7 Zig 37.588µs 23.600µs 322.400µs
8 Kotlin (Native) 138.524µs 105.900µs 388.300µs
9 Python 147.964µs 133.700µs 166.300µs
10 Rust 152.700µs 114.500µs 614.000µs
11 PHP 169.508µs 136.400µs 212.300µs
12 Java 181.836µs 70.200µs 1,122.600µs
13 Ruby 222.004µs 202.800µs 287.300µs
14 JavaScript (Node) 250.648µs 213.800µs 683.000µs
15 JavaScript (Deno) 1,747.728µs 297.400µs 5,030.700µs
16 Kotlin (JVM) 17,731.640µs 2,180.200µs 118,938.700µs
17 JavaScript (Bun) 63,859.168µs 16,668.100µs 109,086.300µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times