Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
ES6 Map vs Hash Table vs Keys
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/132.0.0.0
Browser:
Chrome 132
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
Hash Table
63.7M/s
Array
38.4M/s
ES6 Map
8.0M/s
View exact numbers
Test name
Executions per second
✓
Hash Table
63,652,484 Ops/sec
Array
38,354,324 Ops/sec
ES6 Map
7,965,822 Ops/sec
Tests:
Array
const myObj = {a:1,b:2,c:3} const myArr = Object.keys(myObj) myArr.includes("c")
Hash Table
const myObj = {a:1,b:2,c:3} myObj.hasOwnProperty("c")
ES6 Map
const myObj = {a:1,b:2,c:3} const myMap = new Map(Object.entries(myObj)) myMap.has("c")