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

Use FxHashMap in syntax_pos::symbol::Interner::intern. #50174

Merged
merged 1 commit into from
Apr 24, 2018

Conversation

nnethercote
Copy link
Contributor

Because it's faster than HashMap.

This change reduces the time taken for a few of the rustc-perf
benchmarks, mostly the small ones, by up to 5%.

coercions
        avg: -1.3%      min: -5.5%      max: -0.0%
helloworld-check
        avg: -2.3%      min: -3.5%      max: -1.8%
deeply-nested-check
        avg: -1.4%      min: -3.2%      max: -0.5%
tuple-stress-opt
        avg: -0.7%      min: -2.0%      max: -0.1%
unify-linearly-check
        avg: -1.2%      min: -1.9%      max: -0.6%
coercions-check
        avg: -0.8%      min: -1.3%      max: -0.4%
unused-warnings-check
        avg: -1.0%      min: -1.3%      max: -0.8%
deeply-nested-opt
        avg: -0.5%      min: -1.2%      max: -0.2%
deeply-nested
        avg: -0.7%      min: -1.2%      max: -0.4%
helloworld
        avg: -0.8%      min: -1.1%      max: -0.7%
tuple-stress-check
        avg: -0.5%      min: -1.0%      max: -0.1%
unused-warnings
        avg: -0.8%      min: -1.0%      max: -0.7%
unused-warnings-opt
        avg: -0.8%      min: -1.0%      max: -0.7%
coercions-opt
        avg: -0.5%      min: -1.0%      max: -0.1%
helloworld-opt
        avg: -0.7%      min: -1.0%      max: -0.6%

Because it's faster than HashMap.

This change reduces the time taken for a few of the rustc-perf
benchmarks, mostly the small ones, by up to 5%.
@michaelwoerister
Copy link
Member

Thanks, @nnethercote!

@bors r+

@bors
Copy link
Contributor

bors commented Apr 23, 2018

📌 Commit f7d4c97 has been approved by michaelwoerister

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 23, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Apr 24, 2018
…ichaelwoerister

Use FxHashMap in syntax_pos::symbol::Interner::intern.

Because it's faster than HashMap.

This change reduces the time taken for a few of the rustc-perf
benchmarks, mostly the small ones, by up to 5%.
```
coercions
        avg: -1.3%      min: -5.5%      max: -0.0%
helloworld-check
        avg: -2.3%      min: -3.5%      max: -1.8%
deeply-nested-check
        avg: -1.4%      min: -3.2%      max: -0.5%
tuple-stress-opt
        avg: -0.7%      min: -2.0%      max: -0.1%
unify-linearly-check
        avg: -1.2%      min: -1.9%      max: -0.6%
coercions-check
        avg: -0.8%      min: -1.3%      max: -0.4%
unused-warnings-check
        avg: -1.0%      min: -1.3%      max: -0.8%
deeply-nested-opt
        avg: -0.5%      min: -1.2%      max: -0.2%
deeply-nested
        avg: -0.7%      min: -1.2%      max: -0.4%
helloworld
        avg: -0.8%      min: -1.1%      max: -0.7%
tuple-stress-check
        avg: -0.5%      min: -1.0%      max: -0.1%
unused-warnings
        avg: -0.8%      min: -1.0%      max: -0.7%
unused-warnings-opt
        avg: -0.8%      min: -1.0%      max: -0.7%
coercions-opt
        avg: -0.5%      min: -1.0%      max: -0.1%
helloworld-opt
        avg: -0.7%      min: -1.0%      max: -0.6%
```
bors added a commit that referenced this pull request Apr 24, 2018
Rollup of 11 pull requests

Successful merges:

 - #49461 (std: Child::kill() returns error if process has already exited)
 - #49727 (Add Cell::update)
 - #49812 (Fix revision support for UI tests.)
 - #49829 (Add doc links to `std::os` extension traits)
 - #49906 (Stabilize `std::hint::unreachable_unchecked`.)
 - #49970 (Deprecate Read::chars and char::decode_utf8)
 - #49985 (don't see issue #0)
 - #50118 (fix search bar bug)
 - #50139 (encourage descriptive issue titles)
 - #50174 (Use FxHashMap in syntax_pos::symbol::Interner::intern.)
 - #50185 (core: Fix overflow in `int::mod_euc` when `self < 0 && rhs == MIN`)

Failed merges:
@bors bors merged commit f7d4c97 into rust-lang:master Apr 24, 2018
@nnethercote nnethercote deleted the FxHashMap-Interner branch December 12, 2018 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants