Tests:
  • null object

    AخA
     
    const objNul = Object.create(null);
    for (let i = 0; i < 256; i++){ objNul[String.fromCharCode(i)] = i; }
  • default object

     
    const objDef = {}
    for (let i = 0; i < 256; i++){ objDef[String.fromCharCode(i)] = i; }
  • map

     
    const mapDef = new Map();
    for (let i = 0; i < 256; i++){ mapDef.set(String.fromCharCode(i), i); }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    null object
    default object
    map

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
Firefox 78 on Windows
View result in a separate tab
Test name Executions per second
null object 21176.2 Ops/sec
default object 20723.2 Ops/sec
map 25856.6 Ops/sec