Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131
Mac OS X 10.15.7
Desktop
one year ago
Length 10 destructuring swap
7.9M/s
Length 10 temp swap
7.5M/s
Length 100 destructuring swap
6.9M/s
Length 100 temp swap
6.7M/s
Length 1000 destructuring swap
3.2M/s
Length 1000 temp swap
3.1M/s
View exact numbers
Test name Executions per second
Length 10 destructuring swap 7,893,894 Ops/sec
Length 10 temp swap 7,527,166 Ops/sec
Length 100 destructuring swap 6,945,463 Ops/sec
Length 100 temp swap 6,724,995 Ops/sec
Length 1000 destructuring swap 3,183,559 Ops/sec
Length 1000 temp swap 3,132,133 Ops/sec
Script Preparation code:
Tests: