Benchmarks

Mac Benchmark: Linear Search (x5)

Linear Search is a search algorithm that finds the position of a target value within any kind of array. Performs a linear search through 50 integers in an array for the 4th, 11th, 29th, 36th, and 42nd elements.

number search

All-Time Rankings

Rank Language Average Time Best Time Worst Time
1 C (Clang) 0.203µs 0.180µs 0.283µs
2 C (GCC) 0.211µs 0.184µs 0.303µs
3 C++ (Clang++) 0.313µs 0.256µs 0.612µs
4 GraalVM 0.325µs 0.265µs 0.560µs
5 C++ (G++) 0.360µs 0.000µs 1.000µs
6 Go 0.680µs 0.000µs 1.000µs
7 Kotlin (Native) 1.020µs 0.957µs 1.453µs
8 Rust 1.240µs 1.000µs 2.000µs
9 Zig 2.160µs 2.000µs 3.000µs
10 Java 6.320µs 5.909µs 7.965µs
11 Python 8.680µs 8.000µs 11.000µs
12 PHP 21.703µs 20.437µs 23.450µs
13 Ruby 29.440µs 25.000µs 101.000µs
14 JavaScript (Bun) 48.106µs 36.491µs 240.335µs
15 JavaScript (Deno) 65.293µs 58.666µs 103.231µs
16 JavaScript (Node) 66.135µs 59.086µs 84.233µs
17 Kotlin (JVM) 10,016.562µs 1,511.110µs 85,378.902µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times