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 C++ (G++) 0.258µs 0.221µs 0.390µs
2 C (GCC) 0.303µs 0.250µs 0.401µs
3 Rust 0.939µs 0.661µs 5.319µs
4 C (Clang) 2.528µs 2.104µs 4.259µs
5 C++ (Clang++) 2.675µs 2.154µs 3.787µs
6 Go 3.044µs 2.665µs 3.958µs
7 Java 5.227µs 4.468µs 6.131µs
8 Ruby 9.100µs 6.933µs 14.527µs
9 Python 11.594µs 9.778µs 15.579µs
10 PHP 38.664µs 30.176µs 64.410µs
11 JavaScript (Bun) 160.726µs 145.583µs 176.541µs
12 Kotlin (Native) 542.592µs 106.640µs 10,448.560µs
13 JavaScript (Deno) 1,415.376µs 72.886µs 33,239.805µs
14 JavaScript (Node) 2,505.226µs 51.376µs 59,572.985µs
15 Kotlin (JVM) 34,215.958µs 1,459.300µs 81,244.896µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times