Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_1 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Mobile/14A403 Safari/602.1
Mobile Safari 10
iOS 10.0.1
iPhone
7 years ago
Test name Executions per second
Literal with push 88651.9 Ops/sec
Constructor() with push 82838.1 Ops/sec
Constructor(times) with push 85554.2 Ops/sec
Literal with index 85645.0 Ops/sec
Constructor() with index 79036.2 Ops/sec
Constructor(times) with index 89477.6 Ops/sec
Literal with push and overflow 88126.6 Ops/sec
Constructor() with push and overflow 83177.1 Ops/sec
Constructor(times) with push and overflow 85977.2 Ops/sec
Literal with index and overflow 84226.1 Ops/sec
Constructor() with index and overflow 78855.8 Ops/sec
Constructor(times) with index and overflow 89834.6 Ops/sec
Script Preparation code:
Tests:
  • Literal with push

  • Constructor() with push

  • Constructor(times) with push

  • Literal with index

  • Constructor() with index

  • Constructor(times) with index

  • Literal with push and overflow

  • Constructor() with push and overflow

  • Constructor(times) with push and overflow

  • Literal with index and overflow

  • Constructor() with index and overflow

  • Constructor(times) with index and overflow