Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0
Firefox 86
Windows
Desktop
3 years ago
Test name Executions per second
Length 10 temp swap 4323948.5 Ops/sec
Length 10 destructuring swap 4387144.5 Ops/sec
Length 100 temp swap 1027796.2 Ops/sec
Length 100 destructuring swap 1415802.8 Ops/sec
Length 1000 temp swap 98023.9 Ops/sec
Length 1000 destructuring swap 131955.5 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