Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Chrome 103
Linux
Desktop
2 years ago
Test name Executions per second
Length 10 temp swap 1136927.6 Ops/sec
Length 10 destructuring swap 1153831.9 Ops/sec
Length 100 temp swap 1050260.6 Ops/sec
Length 100 destructuring swap 1076231.8 Ops/sec
Length 1000 temp swap 627123.6 Ops/sec
Length 1000 destructuring swap 624140.1 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