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.329µs | 0.290µs | 0.370µs |
| 2 |
C++ (Clang++)
|
0.418µs | 0.381µs | 0.471µs |
| 3 |
GraalVM
|
0.423µs | 0.360µs | 0.591µs |
| 4 |
C (GCC)
|
0.529µs | 0.411µs | 1.563µs |
| 5 |
C (Clang)
|
0.567µs | 0.391µs | 2.384µs |
| 6 |
D
|
0.660µs | 0.600µs | 0.800µs |
| 7 |
Go
|
1.110µs | 0.992µs | 1.343µs |
| 8 |
Zig
|
1.508µs | 1.252µs | 2.325µs |
| 9 |
Kotlin (Native)
|
1.582µs | 1.382µs | 1.813µs |
| 10 |
Rust
|
1.924µs | 1.723µs | 2.255µs |
| 11 |
Java
|
6.805µs | 5.650µs | 11.541µs |
| 12 |
Ruby
|
28.382µs | 24.426µs | 36.238µs |
| 13 |
JavaScript (Bun)
|
43.968µs | 36.599µs | 53.731µs |
| 14 |
JavaScript (Deno)
|
76.841µs | 57.909µs | 108.855µs |
| 15 |
Python
|
1,764.729µs | 10.800µs | 43,755.321µs |
| 16 |
PHP
|
1,787.252µs | 45.125µs | 38,636.310µs |
| 17 |
JavaScript (Node)
|
2,085.129µs | 39.294µs | 50,789.513µs |
| 18 |
Kotlin (JVM)
|
58,360.642µs | 1,775.054µs | 112,366.379µs |