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 7.776µs 7.000µs 8.400µs
3 C (GCC) 8.748µs 8.200µs 9.300µs
4 D 9.584µs 8.300µs 12.600µs
5 C (Clang) 10.836µs 10.300µs 12.200µs
6 C++ (Clang++) 21.900µs 19.200µs 60.800µs
7 Zig 28.536µs 24.000µs 53.600µs
8 C++ (G++) 49.844µs 29.700µs 360.000µs
9 Java 83.692µs 68.700µs 142.000µs
10 Kotlin (Native) 129.936µs 99.700µs 479.300µs
11 Rust 153.580µs 111.600µs 768.300µs
12 PHP 164.600µs 148.900µs 220.500µs
13 Python 175.332µs 155.300µs 388.800µs
14 JavaScript (Node) 225.564µs 196.300µs 259.400µs
15 Ruby 291.088µs 207.000µs 1,531.200µs
16 JavaScript (Deno) 1,057.524µs 316.600µs 5,569.900µs
17 Kotlin (JVM) 2,576.748µs 2,238.500µs 3,300.400µs
18 JavaScript (Bun) 74,719.560µs 31,254.500µs 248,351.000µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times