Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 Firefox/48.0
Firefox 48
Mac OS X 10.11
Other
8 years ago
Test name Executions per second
Literal with push 194876.4 Ops/sec
Constructor() with push 141010.5 Ops/sec
Constructor(times) with push 85268.8 Ops/sec
Literal with index 131313.1 Ops/sec
Constructor() with index 126079.0 Ops/sec
Constructor(times) with index 143869.8 Ops/sec
Literal with push and overflow 135240.1 Ops/sec
Constructor() with push and overflow 136547.5 Ops/sec
Constructor(times) with push and overflow 79034.5 Ops/sec
Literal with index and overflow 146330.3 Ops/sec
Constructor() with index and overflow 141604.5 Ops/sec
Constructor(times) with index and overflow 157976.5 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