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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 OPR/117.0.0.0
Opera 117 on Windows
View result in a separate tab
Test name Executions per second
Hashmap 20446.9 Ops/sec
Array.filter 0.4 Ops/sec