Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36
Chrome 91
Windows
Desktop
3 years ago
Test name Executions per second
Length 10 temp swap 984665.1 Ops/sec
Length 10 destructuring swap 998721.6 Ops/sec
Length 100 temp swap 919775.8 Ops/sec
Length 100 destructuring swap 930947.6 Ops/sec
Length 1000 temp swap 616818.1 Ops/sec
Length 1000 destructuring swap 637465.2 Ops/sec
Script Preparation code:
Tests:
  • Length 10 temp swap

  • Length 10 destructuring swap

  • Length 100 temp swap

  • Length 100 destructuring swap

  • Length 1000 temp swap

  • Length 1000 destructuring swap