Skip to content

Move all cold code to the end of the function #836

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

Closed
bjorn3 opened this issue Dec 16, 2019 · 0 comments
Closed

Move all cold code to the end of the function #836

bjorn3 opened this issue Dec 16, 2019 · 0 comments
Labels
optimize-speed The speed of the generated executable

Comments

@bjorn3
Copy link
Member

bjorn3 commented Dec 16, 2019

For example code executed when a MIR Assert failed, calls to #[cold] functions (begin_panic, ...), basic blocks marked as cleanup, ...

This improves code locality, which can slightly improve runtime performance.

@bjorn3 bjorn3 added the optimize-speed The speed of the generated executable label Dec 16, 2019
@bjorn3 bjorn3 closed this as completed in c74b306 Jan 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimize-speed The speed of the generated executable
Projects
None yet
Development

No branches or pull requests

1 participant