Benchmarks

Benchmark: Binary Search (x5)

Performs a binary search through 25 sorted integers for the third, ninth, 13th, 16th, and 21st elements.

number search

All-Time Rankings

Rank Language Average Time Best Time Worst Time
1 Go 0.000µs 0.000µs 0.000µs
2 C (GCC) 0.240µs 0.200µs 0.300µs
3 C++ (G++) 0.248µs 0.200µs 0.300µs
4 C++ (Clang++) 0.512µs 0.400µs 0.800µs
5 C (Clang) 1.856µs 0.600µs 30.700µs
6 Java 5.292µs 4.900µs 6.200µs
7 Rust 5.636µs 3.900µs 27.000µs
8 Python 12.420µs 9.600µs 43.100µs
9 Ruby 20.432µs 11.200µs 55.400µs
10 PHP 26.844µs 22.200µs 47.800µs
11 JavaScript (Node) 78.052µs 60.300µs 140.000µs
12 JavaScript (Deno) 117.088µs 82.300µs 442.300µs
13 Kotlin (Native) 211.248µs 99.900µs 2,540.300µs
14 JavaScript (Bun) 216.080µs 177.800µs 291.400µs
15 Kotlin (JVM) 5,388.328µs 1,840.200µs 50,834.600µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times