Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36 OPR/39.0.2256.48
Opera 39
Mac OS X 10.11.6
Other
7 years ago
Test name Executions per second
Literal with push 121191.0 Ops/sec
Constructor() with push 113659.2 Ops/sec
Constructor(times) with push 106854.0 Ops/sec
Literal with index 175652.3 Ops/sec
Constructor() with index 169615.3 Ops/sec
Constructor(times) with index 196414.7 Ops/sec
Literal with push and overflow 123293.7 Ops/sec
Constructor() with push and overflow 113680.5 Ops/sec
Constructor(times) with push and overflow 99542.1 Ops/sec
Literal with index and overflow 172926.9 Ops/sec
Constructor() with index and overflow 168488.6 Ops/sec
Constructor(times) with index and overflow 195902.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