js objects vs maps

Benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
obj get
let obj = {
	"a":"a",
	"s":"s",
	"d":"d"
}
console.log(obj["a"])
console.log(obj["s"])
console.log(obj["d"])
ready
map get
const myMap = new Map([["a","a"],["s","s"],["d", "d"]])
console.log(myMap.get("a"))
console.log(myMap.get("s"))
console.log(myMap.get("d"))

ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.