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

Put crate metadata first in rlibs whenever possible #93806

Closed
bjorn3 opened this issue Feb 9, 2022 · 0 comments · Fixed by #93816
Closed

Put crate metadata first in rlibs whenever possible #93806

bjorn3 opened this issue Feb 9, 2022 · 0 comments · Fixed by #93816
Labels
A-metadata Area: Crate metadata I-compiletime Issue: Problems and improvements with respect to compile times. WG-compiler-performance Working group: Compiler Performance

Comments

@bjorn3
Copy link
Member

bjorn3 commented Feb 9, 2022

In the past rlib metadata had to be the last archive member as the linker stops at the first non-object member. The rlib metadata has somewhat recently been changed to be wrapped in an object file on most platforms, which allows it to be anywhere in the rlib. Putting it first would allow for quicker metadata reading as it would no longer be necessary to read the header of every archive member to find the crate metadata, only the first member header.

@bjorn3 bjorn3 added I-slow Issue: Problems and improvements with respect to performance of generated code. A-metadata Area: Crate metadata WG-compiler-performance Working group: Compiler Performance labels Feb 9, 2022
@nikic nikic added I-compiletime Issue: Problems and improvements with respect to compile times. and removed I-slow Issue: Problems and improvements with respect to performance of generated code. labels Feb 9, 2022
@bors bors closed this as completed in 3b18651 Feb 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-metadata Area: Crate metadata I-compiletime Issue: Problems and improvements with respect to compile times. WG-compiler-performance Working group: Compiler Performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants