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.191µs 0.165µs 0.258µs
2 C (GCC) 0.206µs 0.163µs 0.266µs
3 C++ (Clang++) 0.296µs 0.246µs 0.463µs
4 GraalVM 0.312µs 0.248µs 0.623µs
5 D 0.376µs 0.300µs 0.700µs
6 C++ (G++) 0.400µs 0.000µs 1.000µs
7 Go 0.720µs 0.000µs 1.000µs
8 Rust 1.320µs 1.000µs 2.000µs
9 Kotlin (Native) 1.513µs 0.900µs 14.362µs
10 Zig 2.240µs 2.000µs 3.000µs
11 Python 9.000µs 7.000µs 14.000µs
12 PHP 21.524µs 19.678µs 27.128µs
13 Ruby 28.840µs 24.000µs 46.000µs
14 JavaScript (Bun) 54.768µs 36.180µs 300.531µs
15 JavaScript (Deno) 60.212µs 52.319µs 97.602µs
16 JavaScript (Node) 66.697µs 56.142µs 107.302µs
17 Java 125.141µs 5.613µs 2,977.783µs
18 Kotlin (JVM) 109,798.672µs 1,458.574µs 1,372,795.272µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times