Benchmark Family
Searching
Deterministic lookup benchmarks for exact search, bound queries, and hash lookup baselines.
Generated
Apr 28, 2026, 12:07 PM
Measured
1,395
Skipped
465
Failures
0
Algorithms
10
Profiles / targets
6 / 7
How to Read These Results
Benchmarks measure specific local JavaScript implementations on deterministic inputs. Results depend on runtime, hardware, implementation details, and input shape. They are not universal algorithm rankings.
Sorted-input algorithms skip unsupported fixtures, and hash lookup is a data-structure baseline rather than a direct ordered-array comparison.
Algorithms Tested
Readable implementations included in this run
Linear Search
Linear / First IndexScans left to right and returns the first matching index or -1.
Binary Search
Ordered / Exact IndexClassic ordered-array binary search; returns any matching index or -1.
Lower Bound
Bound / Lower Bound IndexReturns the first index whose value is greater than or equal to the target.
Upper Bound
Bound / Upper Bound IndexReturns the first index whose value is greater than the target.
Jump Search
Ordered / Exact IndexJumps by sqrt(n) blocks in sorted input, then scans within the candidate block.
Exponential Search
Ordered / Exact IndexExpands an ordered range exponentially, then binary-searches the bounded interval.
Interpolation Search
Distribution / Exact IndexSorted numeric search using position interpolation; safest on roughly uniform distributions.
Ternary-Style Ordered Search
Ordered / Exact IndexOrdered-array exact search that splits the search interval into thirds; not unimodal optimization ternary search.
Hash Lookup (Prebuilt)
Data Structure / Boolean LookupSet.has lookup with the Set built outside the timed lookup; data-structure baseline.
Hash Lookup (Build + Query)
Data Structure / Boolean LookupBuilds a Set from the input and performs one lookup inside the timed run.
Input profiles
Fixture coverage in this family
Target patterns
Fixture coverage in this family
Summary Findings
Careful takeaways from the generated benchmark data
- Batched per-query timing is used so very fast lookup operations remain measurable.
- Lower-bound and upper-bound entries validate bound semantics, not exact-match semantics.
- Hash lookup baselines are separated because prebuilt lookup and build-plus-query have different cost models.
Hash Lookup Baselines
Data-structure baselines are shown separately from ordered-array search algorithms.
| Algorithm | Measured | Avg rank | Median | Fastest | Skipped |
|---|---|---|---|---|---|
| Hash Lookup (Prebuilt) | 186 | 1 | 1 | 186 | 0 |
| Hash Lookup (Build + Query) | 186 | 2 | 2 | 0 | 0 |
Ordered-Array Search Summary
Aggregate ranks for ordered-search algorithms across compatible sorted fixtures.
| Algorithm | Measured | Avg rank | Median | Fastest | Skipped |
|---|---|---|---|---|---|
| Interpolation Search | 93 | 1.258 | 1 | 82 | 93 |
| Ternary-Style Ordered Search | 124 | 2.766 | 2 | 12 | 62 |
| Exponential Search | 124 | 4.202 | 5 | 19 | 62 |
| Binary Search | 124 | 4.395 | 4 | 2 | 62 |
| Lower Bound | 124 | 4.887 | 5 | 0 | 62 |
| Linear Search | 186 | 4.93 | 7 | 69 | 0 |
| Jump Search | 124 | 4.935 | 5 | 1 | 62 |
| Upper Bound | 124 | 4.976 | 5 | 1 | 62 |
Mixed Workload Preview
Selected mixed-target workload cells using batched per-query timing.
| Profile | Size | Algorithm | Median us/query |
|---|---|---|---|
| Nearly Sorted | 1,000 | Hash Lookup (Prebuilt) | 0.009 |
| Nearly Sorted | 10,000 | Hash Lookup (Prebuilt) | 0.009 |
| Nearly Sorted | 100,000 | Hash Lookup (Prebuilt) | 0.008 |
| Random Unsorted | 1,000 | Hash Lookup (Prebuilt) | 0.009 |
| Random Unsorted | 10,000 | Hash Lookup (Prebuilt) | 0.008 |
| Random Unsorted | 100,000 | Hash Lookup (Prebuilt) | 0.009 |
| Sorted Dense | 1,000 | Hash Lookup (Prebuilt) | 0.008 |
| Sorted Dense | 10,000 | Interpolation Search | 0.008 |
Interpretation notes
Context for interpreting this family
- Single-process JavaScript timing can be affected by garbage collection, JIT behavior, and system load.
- Per-query timing is estimated from batched measured runs.
- Hash lookup baselines have different cost models from ordered array search.
- Lower-bound and upper-bound validate bound semantics, not exact-match semantics.
- No memory profiling or browser-runtime comparison is included.
Outputs
Generated benchmark artifacts used by this public page
Limitations
Scope boundaries for this benchmark family
- Single-process JavaScript timing can be affected by garbage collection, JIT behavior, and system load.
- Per-query timing is estimated from batched measured runs.
- Hash lookup baselines have different cost models from ordered array search.
- Lower-bound and upper-bound validate bound semantics, not exact-match semantics.
- No memory profiling or browser-runtime comparison is included.