map vs oL

Benchmark created by Eduard on


Setup

var obj = {}
  var map = new Map();
  
  for (var idx = 0; idx < 10000; idx++) {
    obj["_" + idx] = idx;
    map.set("_" + idx, idx);
  }

Test runner

Ready to run.

Testing in
TestOps/sec
OL
var value = obj._1000;
ready
Map
var value2 = map.get("_1000");
ready

Revisions

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