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 176641.5 Ops/sec
Constructor() with push 182003.4 Ops/sec
Constructor(times) with push 184420.1 Ops/sec
Literal with index 186757.3 Ops/sec
Constructor() with index 188563.9 Ops/sec
Constructor(times) with index 201643.5 Ops/sec
Literal with push and overflow 189959.3 Ops/sec
Constructor() with push and overflow 184543.4 Ops/sec
Constructor(times) with push and overflow 178692.3 Ops/sec
Literal with index and overflow 189303.3 Ops/sec
Constructor() with index and overflow 183981.3 Ops/sec
Constructor(times) with index and overflow 202437.3 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