Skip to content

Fewer instantiations of Option::map_or #399

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 24, 2017
Merged

Fewer instantiations of Option::map_or #399

merged 1 commit into from
Dec 24, 2017

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Dec 24, 2017

This lowers us from 59 instantiations of Option::map_or to just 6. On my computer this improves serde_json compile time by about 5%. Pretty wild!

Fixes #391. Hopefully the real fix will be rust-lang/rust#46758.

This lowers us from 59 instantiations of Option::map_or to just 6. On my
computer this improves serde_json compile time by about 5%. Pretty wild!
@dtolnay dtolnay merged commit a2038cf into master Dec 24, 2017
@dtolnay dtolnay deleted the map-or branch December 24, 2017 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Option::map_or is being instantiated too much
1 participant