map vs arr (v2)

Revision 2 of this benchmark created on


Setup

var hash = {};
var m = new Map();
for(let i = 0; i < 100000; i++) {
  hash[`${i}`] = i;
  m.set(`${i}`, i);
}

Test runner

Ready to run.

Testing in
TestOps/sec
hash
hash["8356"] = 0x010;
ready
set
m.set("8356", 0x010);
ready

Revisions

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