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.160µs 0.000µs 1.000µs
2 C (GCC) 0.230µs 0.114µs 0.551µs
3 C++ (Clang++) 0.408µs 0.354µs 0.444µs
4 C (Clang) 0.455µs 0.411µs 0.609µs
5 Go 0.760µs 0.000µs 2.000µs
6 Rust 0.800µs 0.000µs 1.000µs
7 Java 4.421µs 3.974µs 7.328µs
8 Python 8.560µs 8.000µs 12.000µs
9 Ruby 10.640µs 8.000µs 59.000µs
10 Kotlin (Native) 16.157µs 13.762µs 48.331µs
11 PHP 27.104µs 24.735µs 39.802µs
12 JavaScript (Node) 57.751µs 53.478µs 74.774µs
13 JavaScript (Deno) 82.383µs 74.127µs 150.495µs
14 JavaScript (Bun) 159.608µs 134.575µs 402.545µs
15 Kotlin (JVM) 2,324.435µs 1,167.615µs 11,220.445µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times