Skip to content

Purge @-boxes from the reading half of EBML #11057

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

Merged
merged 1 commit into from
Dec 20, 2013

Conversation

alexcrichton
Copy link
Member

Now that the metadata is an owned value with a lifetime of a borrowed byte
slice, it's possible to have future optimizations where the metadata doesn't
need to be copied around (very expensive operation).

@@ -27,9 +27,13 @@ use syntax::parse::token::ident_interner;
// own crate numbers.
pub type cnum_map = @mut HashMap<ast::CrateNum, ast::CrateNum>;

pub enum MetadataBlob {
MetadataVec(~[u8]),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, I'm going to add another variant MetadataArchive(ArchiveRO) so we never need to even copy the metadata out of LLVM (plus it's all mapped in by mmap from the OS for extra no-copy speed)

Now that the metadata is an owned value with a lifetime of a borrowed byte
slice, it's possible to have future optimizations where the metadata doesn't
need to be copied around (very expensive operation).
bors added a commit that referenced this pull request Dec 20, 2013
Now that the metadata is an owned value with a lifetime of a borrowed byte
slice, it's possible to have future optimizations where the metadata doesn't
need to be copied around (very expensive operation).
@bors bors closed this Dec 20, 2013
@bors bors merged commit 73fceca into rust-lang:master Dec 20, 2013
@alexcrichton alexcrichton deleted the no-at-in-ebml branch December 20, 2013 07:13
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