Script Preparation code:
Tests:
  • While Loop with declaration

  • While Loop with Slice

  • While Loop with Push and Slice

  • While Loop with Push

  • Array.from with map

  • Array.from with map and slice

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    While Loop with declaration
    While Loop with Slice
    While Loop with Push and Slice
    While Loop with Push
    Array.from with map
    Array.from with map and slice

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
Chrome 87 on Windows
View result in a separate tab
Test name Executions per second
While Loop with declaration 285314.0 Ops/sec
While Loop with Slice 1484854.5 Ops/sec
While Loop with Push and Slice 1377482.8 Ops/sec
While Loop with Push 282811.1 Ops/sec
Array.from with map 225431.3 Ops/sec
Array.from with map and slice 667623.4 Ops/sec