Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/601.7.7 (KHTML, like Gecko) Version/9.1.2 Safari/537.86.7
Safari 9
Mac OS X 10.9.5
Other
7 years ago
Test name Executions per second
Literal with push 34949.3 Ops/sec
Constructor() with push 34417.3 Ops/sec
Constructor(times) with push 34025.0 Ops/sec
Literal with index 103784.3 Ops/sec
Constructor() with index 105194.0 Ops/sec
Constructor(times) with index 106074.6 Ops/sec
Literal with push and overflow 39863.5 Ops/sec
Constructor() with push and overflow 36028.5 Ops/sec
Constructor(times) with push and overflow 34936.0 Ops/sec
Literal with index and overflow 108647.5 Ops/sec
Constructor() with index and overflow 107736.0 Ops/sec
Constructor(times) with index and overflow 106580.1 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