Benchmarks

Windows Benchmark: Binary Search (x5)

Binary Search is a search algorithm that finds the position of a target value within a sorted array. 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++ (G++) 0.228µs 0.200µs 0.300µs
3 D 0.288µs 0.200µs 0.400µs
4 C (GCC) 0.312µs 0.200µs 0.500µs
5 C (Clang) 0.388µs 0.300µs 0.500µs
6 Kotlin (Native) 1.172µs 1.000µs 1.300µs
7 C++ (Clang++) 1.664µs 0.300µs 31.400µs
8 GraalVM 3.508µs 2.700µs 4.500µs
9 Rust 4.324µs 3.500µs 4.800µs
10 Zig 4.376µs 3.000µs 29.000µs
11 Java 7.196µs 3.800µs 56.700µs
12 Python 9.732µs 9.000µs 10.500µs
13 Ruby 11.580µs 9.600µs 14.300µs
14 PHP 27.668µs 19.600µs 148.100µs
15 JavaScript (Node) 101.356µs 68.500µs 530.200µs
16 JavaScript (Deno) 124.336µs 62.700µs 805.299µs
17 JavaScript (Bun) 189.856µs 127.100µs 525.200µs
18 Kotlin (JVM) 6,304.516µs 2,143.200µs 51,634.900µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times