Tests:
-
Length 10 temp swap
-
Length 10 destructuring swap
-
Length 100 temp swap
-
Length 100 destructuring swap
-
Length 1000 temp swap
-
Length 1000 destructuring swap
-
Length 10 xor swap
-
Length 100 xor swap
-
Length 1000 xor swap
Rendered benchmark preparation results:
Latest run results:
Run details: (Test run date:
9 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0
Chrome 142 on Windows
View result in a separate tab
Length 10 destructuring swap
52.7M/s
Length 10 xor swap
41.8M/s
Length 10 temp swap
40.1M/s
Length 100 destructuring swap
22.4M/s
Length 100 temp swap
21.5M/s
Length 100 xor swap
20.7M/s
Length 1000 destructuring swap
3.5M/s
Length 1000 temp swap
3.4M/s
Length 1000 xor swap
3.0M/s
View exact numbers
| Test name |
Executions per second |
|
✓
Length 10 destructuring swap
|
52,704,984 Ops/sec |
|
Length 10 xor swap
|
41,836,324 Ops/sec |
|
Length 10 temp swap
|
40,125,360 Ops/sec |
|
Length 100 destructuring swap
|
22,354,640 Ops/sec |
|
Length 100 temp swap
|
21,458,682 Ops/sec |
|
Length 100 xor swap
|
20,714,988 Ops/sec |
|
Length 1000 destructuring swap
|
3,454,685 Ops/sec |
|
Length 1000 temp swap
|
3,367,782 Ops/sec |
|
Length 1000 xor swap
|
2,993,624 Ops/sec |
Do you really want to delete benchmark?