Run details:
Mozilla/5.0 (Windows NT 6.2; ARM; Trident/7.0; Touch; rv:11.0; WPDesktop; Lumia 640 XL Dual SIM) like Gecko
IE 11
Windows RT
Lumia 640
7 years ago
Test name Executions per second
Literal with push 6943.5 Ops/sec
Constructor() with push 7059.2 Ops/sec
Constructor(times) with push 6037.5 Ops/sec
Literal with index 28779.5 Ops/sec
Constructor() with index 29203.0 Ops/sec
Constructor(times) with index 28239.7 Ops/sec
Literal with push and overflow 7143.0 Ops/sec
Constructor() with push and overflow 7102.6 Ops/sec
Constructor(times) with push and overflow 6146.4 Ops/sec
Literal with index and overflow 27820.5 Ops/sec
Constructor() with index and overflow 27288.0 Ops/sec
Constructor(times) with index and overflow 27574.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