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
44.5M/s
Length 10 temp swap
34.0M/s
Length 100 destructuring swap
26.2M/s
Length 100 temp swap
22.8M/s
Length 1000 destructuring swap
4.7M/s
Length 1000 temp swap
4.6M/s
View exact numbers
Test name Executions per second
Length 10 destructuring swap 44,478,964 Ops/sec
Length 10 temp swap 34,021,492 Ops/sec
Length 100 destructuring swap 26,239,674 Ops/sec
Length 100 temp swap 22,783,310 Ops/sec
Length 1000 destructuring swap 4,740,664 Ops/sec
Length 1000 temp swap 4,556,348 Ops/sec
Script Preparation code:
Tests: