Script Preparation code:
x
 
const counter = 10000
const map = new Map()
const array = new Array(counter)
window.counter = counter
window.map = map
window.array = array
for (let i = 0; i < counter; i++) {
    map.set(i)
    array[counter] = i
}
Tests:
  • Hashmap

     
    for (let i = 0; i < 20000; i++) {
        window.map.has(500)
    }
  • Array.filter

     
    for (let i = 0; i < 20000; i++) {
        window.array.filter((value) => value === 500)
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Hashmap
    Array.filter

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one month ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 18_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Mobile/15E148 Safari/604.1
Mobile Safari 18 on iOS 18.1
View result in a separate tab
Test name Executions per second
Hashmap 7643.1 Ops/sec
Array.filter 11.3 Ops/sec