Benchmarks

Linux 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++ (G++) 0.347µs 0.311µs 0.390µs
2 C++ (Clang++) 0.430µs 0.390µs 0.501µs
3 GraalVM 0.444µs 0.331µs 0.782µs
4 C (GCC) 0.473µs 0.411µs 0.772µs
5 C (Clang) 0.515µs 0.381µs 0.682µs
6 Go 1.123µs 1.022µs 1.372µs
7 Zig 1.489µs 1.332µs 1.763µs
8 Kotlin (Native) 1.586µs 1.393µs 1.884µs
9 Rust 2.045µs 1.784µs 2.875µs
10 Java 6.601µs 5.811µs 7.664µs
11 Python 13.438µs 10.440µs 19.157µs
12 JavaScript (Bun) 43.211µs 34.866µs 56.677µs
13 PHP 57.262µs 52.339µs 67.949µs
14 Ruby 324.024µs 25.118µs 7,409.839µs
15 JavaScript (Deno) 2,043.614µs 53.661µs 49,349.779µs
16 JavaScript (Node) 2,624.549µs 41.919µs 53,143.781µs
17 Kotlin (JVM) 58,751.054µs 1,913.203µs 103,002.441µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times