-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-destructuring_assignment`#![feature(destructuring_assignment)]``#![feature(destructuring_assignment)]`I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.
Description
Opening a new bug as requested in #90521 (comment)
I wanted to check how (a,b) = (b,a)
compares to mem::swap,
it looks like mem::swap
applies optimizations when T
is 32 bytes or bigger but destructuring_assignment
doesn't.
I tried this code:
https://godbolt.org/z/czfTv3nzW
I expected to see this happen:
Both function should generate the same (optimal) code
Instead, this happened:
mem::swap
applies optimizations while destructuring_assignment
doesn't
zirconium-n
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-destructuring_assignment`#![feature(destructuring_assignment)]``#![feature(destructuring_assignment)]`I-slowIssue: Problems and improvements with respect to performance of generated code.Issue: Problems and improvements with respect to performance of generated code.