Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Mobile/15E148 Safari/604.1
Mobile Safari 16
iOS 16.4.1
Mobile
one year ago
Test name Executions per second
Generator populating a map via for...of 3.6 Ops/sec
Generator populating a map via Map.prototype.constructor 2.4 Ops/sec
recursively add to map using Array.prototype.forEach 10.8 Ops/sec
recursively add to map using for...of 11.9 Ops/sec
Script Preparation code:
Tests:
  • Generator populating a map via for...of

  • Generator populating a map via Map.prototype.constructor

  • recursively add to map using Array.prototype.forEach

  • recursively add to map using for...of