Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_2 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) OPiOS/14.0.0.104835 Mobile/13F69 Safari/9537.53
Mobile Safari 9
iOS 9.3.2
iPhone
8 years ago
Test name Executions per second
Literal with push 25997.2 Ops/sec
Constructor() with push 26508.9 Ops/sec
Constructor(times) with push 26011.9 Ops/sec
Literal with index 44241.4 Ops/sec
Constructor() with index 42556.2 Ops/sec
Constructor(times) with index 43431.1 Ops/sec
Literal with push and overflow 26224.1 Ops/sec
Constructor() with push and overflow 26015.5 Ops/sec
Constructor(times) with push and overflow 26110.8 Ops/sec
Literal with index and overflow 43841.5 Ops/sec
Constructor() with index and overflow 42727.5 Ops/sec
Constructor(times) with index and overflow 43142.0 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


;