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.250µs 0.200µs 0.300µs
2 C++ (Clang++) 0.305µs 0.261µs 0.360µs
3 GraalVM 0.370µs 0.300µs 0.521µs
4 C (GCC) 0.400µs 0.301µs 0.521µs
5 C (Clang) 0.433µs 0.381µs 0.641µs
6 Rust 0.699µs 0.611µs 1.252µs
7 Zig 0.886µs 0.811µs 1.142µs
8 Go 1.052µs 0.902µs 1.443µs
9 Kotlin (Native) 1.097µs 0.952µs 1.393µs
10 Java 4.739µs 3.727µs 11.331µs
11 Ruby 8.313µs 6.532µs 13.696µs
12 Python 13.284µs 8.707µs 36.489µs
13 PHP 32.441µs 28.103µs 53.612µs
14 JavaScript (Bun) 1,075.893µs 134.554µs 12,767.927µs
15 JavaScript (Deno) 3,683.368µs 70.955µs 74,885.395µs
16 JavaScript (Node) 5,235.487µs 63.531µs 67,201.162µs
17 Kotlin (JVM) 52,322.525µs 1,710.814µs 85,694.139µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times