Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/132.0.0.0
Chrome 132
Windows
Desktop
one year ago
Length 10 destructuring swap
30.6M/s
Length 10 temp swap
23.5M/s
Length 100 temp swap
14.6M/s
Length 100 destructuring swap
12.9M/s
Length 1000 destructuring swap
1.6M/s
Length 1000 temp swap
1.5M/s
View exact numbers
Test name Executions per second
Length 10 destructuring swap 30,575,496 Ops/sec
Length 10 temp swap 23,495,080 Ops/sec
Length 100 temp swap 14,638,638 Ops/sec
Length 100 destructuring swap 12,871,413 Ops/sec
Length 1000 destructuring swap 1,600,518 Ops/sec
Length 1000 temp swap 1,502,858 Ops/sec
Script Preparation code:
Tests: