Benchmarks

Linux 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 C++ (G++) 0.249µs 0.220µs 0.300µs
2 D 0.284µs 0.200µs 0.300µs
3 C++ (Clang++) 0.307µs 0.271µs 0.341µs
4 C (GCC) 0.400µs 0.361µs 0.521µs
5 GraalVM 0.408µs 0.311µs 0.732µs
6 C (Clang) 0.431µs 0.380µs 0.742µs
7 Rust 0.776µs 0.642µs 1.182µs
8 Zig 0.921µs 0.801µs 1.212µs
9 Go 1.042µs 0.872µs 1.413µs
10 Kotlin (Native) 1.052µs 0.922µs 1.242µs
11 Java 4.600µs 3.647µs 5.520µs
12 Ruby 7.793µs 6.323µs 13.014µs
13 Python 12.447µs 9.297µs 32.360µs
14 PHP 34.121µs 29.575µs 54.322µs
15 JavaScript (Bun) 163.242µs 138.229µs 245.270µs
16 JavaScript (Deno) 1,079.995µs 69.851µs 24,897.889µs
17 JavaScript (Node) 2,488.506µs 64.972µs 60,326.042µs
18 Kotlin (JVM) 63,144.471µs 2,007.277µs 128,074.914µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times