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
54.8M/s
Length 10 temp swap
43.7M/s
Length 100 destructuring swap
31.1M/s
Length 100 temp swap
27.1M/s
Length 1000 temp swap
5.1M/s
Length 1000 destructuring swap
4.1M/s
View exact numbers
Test name Executions per second
Length 10 destructuring swap 54,763,904 Ops/sec
Length 10 temp swap 43,687,540 Ops/sec
Length 100 destructuring swap 31,097,770 Ops/sec
Length 100 temp swap 27,119,800 Ops/sec
Length 1000 temp swap 5,093,596 Ops/sec
Length 1000 destructuring swap 4,075,307 Ops/sec
Script Preparation code:
Tests: