Benchmarks

Windows 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.328µs 0.200µs 0.400µs
2 C (GCC) 0.448µs 0.400µs 0.600µs
3 C (Clang) 0.468µs 0.400µs 0.700µs
4 C++ (Clang++) 0.508µs 0.400µs 0.600µs
5 Kotlin (Native) 1.624µs 1.500µs 1.800µs
6 Zig 4.112µs 3.500µs 4.900µs
7 GraalVM 4.308µs 3.200µs 6.100µs
8 Rust 5.968µs 5.100µs 6.700µs
9 Python 12.228µs 11.100µs 22.900µs
10 Java 12.688µs 5.700µs 136.600µs
11 PHP 19.348µs 14.900µs 79.900µs
12 Ruby 32.048µs 29.100µs 36.000µs
13 Go 39.808µs 0.000µs 995.200µs
14 JavaScript (Node) 58.120µs 51.400µs 67.700µs
15 JavaScript (Bun) 64.676µs 45.800µs 113.400µs
16 JavaScript (Deno) 80.004µs 52.200µs 271.800µs
17 Kotlin (JVM) 3,987.228µs 2,110.500µs 32,157.000µs

Average Times

Median Times

Best-Case Scenario Times

Worst-Case Scenario Times