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 |
Go
|
0.000µs | 0.000µs | 0.000µs |
| 2 |
C (GCC)
|
0.280µs | 0.200µs | 0.400µs |
| 3 |
C++ (G++)
|
0.300µs | 0.300µs | 0.300µs |
| 4 |
C (Clang)
|
0.436µs | 0.400µs | 0.500µs |
| 5 |
D
|
0.440µs | 0.300µs | 0.600µs |
| 6 |
C++ (Clang++)
|
0.532µs | 0.400µs | 1.100µs |
| 7 |
Kotlin (Native)
|
1.696µs | 1.500µs | 2.000µs |
| 8 |
GraalVM
|
3.488µs | 2.800µs | 4.200µs |
| 9 |
Zig
|
3.740µs | 3.300µs | 4.700µs |
| 10 |
Rust
|
5.312µs | 4.700µs | 6.200µs |
| 11 |
Java
|
7.588µs | 5.500µs | 40.700µs |
| 12 |
Python
|
13.684µs | 12.600µs | 15.000µs |
| 13 |
PHP
|
14.296µs | 11.500µs | 16.700µs |
| 14 |
Ruby
|
39.328µs | 29.300µs | 186.300µs |
| 15 |
JavaScript (Bun)
|
52.840µs | 41.500µs | 66.000µs |
| 16 |
JavaScript (Node)
|
60.272µs | 50.400µs | 91.600µs |
| 17 |
JavaScript (Deno)
|
73.504µs | 50.700µs | 270.500µs |
| 18 |
Kotlin (JVM)
|
8,390.512µs | 2,173.600µs | 117,277.500µs |