Run details:
Mozilla/5.0 (Android 14; Mobile; rv:134.0) Gecko/134.0 Firefox/134.0
Firefox Mobile 134
Android
Mobile
2 months ago
Test name Executions per second
Length 10 temp swap 3996484.0 Ops/sec
Length 10 destructuring swap 2946590.8 Ops/sec
Length 100 temp swap 1847200.6 Ops/sec
Length 100 destructuring swap 1357980.9 Ops/sec
Length 1000 temp swap 188002.8 Ops/sec
Length 1000 destructuring swap 195659.4 Ops/sec
Length 10 xor swap 3152567.0 Ops/sec
Length 100 xor swap 1386054.1 Ops/sec
Length 1000 xor swap 199069.9 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

  • Length 10 xor swap

  • Length 100 xor swap

  • Length 1000 xor swap