Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Edg/138.0.0.0
Chrome 138
Mac OS X 10.15.7
Desktop
9 months ago
Test name Executions per second
Object literals 95391768.0 Ops/sec
Object.create(null) and then set properties 12782467.0 Ops/sec
Object.create(null) with descriptors. 2097598.5 Ops/sec
new Object and then set properties 96637520.0 Ops/sec
Object literals then set prototype to null 9272074.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Object literals

  • Object.create(null) and then set properties

  • Object.create(null) with descriptors.

  • new Object and then set properties

  • Object literals then set prototype to null