Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set repr(C) on the Dsp struct to recover performance #889

Merged
merged 1 commit into from
Apr 23, 2023

Conversation

joshtriplett
Copy link
Contributor

After rust-lang/rust#102750 , Rust reorders
fields in repr(Rust) structures based on size/alignment. Applying such
reordering to the Dsp struct substantially hurts performance.

Set repr(C) on the Dsp struct to recover that performance.

See
https://internals.rust-lang.org/t/unexpected-3-x-performance-regression-starting-with-rust-version-1-67/18724
for the test case and investigations that led to this.

After rust-lang/rust#102750 , Rust reorders
fields in repr(Rust) structures based on size/alignment. Applying such
reordering to the Dsp struct substantially hurts performance.

Set repr(C) on the Dsp struct to recover that performance.

See
https://internals.rust-lang.org/t/unexpected-3-x-performance-regression-starting-with-rust-version-1-67/18724
for the test case and investigations that led to this.
@sletz sletz merged commit cb0772a into grame-cncm:master-dev Apr 23, 2023
@sletz
Copy link
Member

sletz commented Apr 23, 2023

Thanks.

@joshtriplett joshtriplett deleted the repr-c branch April 23, 2023 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants