Script Preparation code:
Tests:

Historical Performance Data aggregated from 16 community runs

Desktop Results:
Chrome 10 runs
Length 10 destructuring swap
31.3M/s
Length 10 temp swap
24.5M/s
Length 100 temp swap
15.0M/s
Length 100 destructuring swap
13.5M/s
Length 1000 destructuring swap
2.9M/s
Length 1000 temp swap
2.8M/s

Fastest: Length 10 destructuring swap (11.0x faster)

View exact numbers
  • Length 10 destructuring swap: 31,348,802 ops/sec
  • Length 10 temp swap: 24,476,852 ops/sec
  • Length 100 temp swap: 14,973,391 ops/sec
  • Length 100 destructuring swap: 13,547,130 ops/sec
  • Length 1000 destructuring swap: 2,908,015 ops/sec
  • Length 1000 temp swap: 2,839,740 ops/sec
Firefox 6 runs
Length 10 temp swap
10.7M/s
Length 10 destructuring swap
8.4M/s
Length 100 destructuring swap
3.3M/s
Length 100 temp swap
3.3M/s
Length 1000 temp swap
377K/s
Length 1000 destructuring swap
343K/s

Fastest: Length 10 temp swap (31.3x faster)

View exact numbers
  • Length 10 temp swap: 10,745,978 ops/sec
  • Length 10 destructuring swap: 8,405,135 ops/sec
  • Length 100 destructuring swap: 3,315,364 ops/sec
  • Length 100 temp swap: 3,261,034 ops/sec
  • Length 1000 temp swap: 377,085 ops/sec
  • Length 1000 destructuring swap: 343,291 ops/sec

Results show median performance across all community submissions. Run this benchmark yourself to verify on your device.

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Length 10 temp swap
    Length 10 destructuring swap
    Length 100 temp swap
    Length 100 destructuring swap
    Length 1000 temp swap
    Length 1000 destructuring swap

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
Firefox 137 on Windows
View result in a separate tab
Length 10 temp swap
10.3M/s
Length 10 destructuring swap
6.7M/s
Length 100 destructuring swap
2.8M/s
Length 100 temp swap
2.8M/s
Length 1000 destructuring swap
958K/s
Length 1000 temp swap
901K/s
View exact numbers
Test name Executions per second
Length 10 temp swap 10,288,681 Ops/sec
Length 10 destructuring swap 6,725,437 Ops/sec
Length 100 destructuring swap 2,823,133 Ops/sec
Length 100 temp swap 2,771,988 Ops/sec
Length 1000 destructuring swap 957,672 Ops/sec
Length 1000 temp swap 901,148 Ops/sec