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

make trait matching smarter with projections #27866

Merged
merged 4 commits into from
Aug 18, 2015

Commits on Aug 17, 2015

  1. make trait matching smarter with projections

    also, use the right caching logic for type_moves_by_default (this was
    broken by @jroesch).
    
    before:
    593.10user 5.21system 7:51.41elapsed 126%CPU (0avgtext+0avgdata 1150016maxresident)k
    llvm: 427.045
    
    after:
    577.76user 4.27system 7:36.13elapsed 127%CPU (0avgtext+0avgdata 1141608maxresident)k
    llvm: 431.001
    Ariel Ben-Yehuda committed Aug 17, 2015
    Configuration menu
    Copy the full SHA
    9b75a2b View commit details
    Browse the repository at this point in the history
  2. use an FnvHashSet instead of an HashSet in fulfill

    this doesn't cause a measurable perf increase, but it makes callgrind output
    cleaner. Anyway, rustc should be using FNV everywhere.
    Ariel Ben-Yehuda committed Aug 17, 2015
    Configuration menu
    Copy the full SHA
    96e6b2f View commit details
    Browse the repository at this point in the history
  3. add a fast-path to resolve_type_vars_if_possible

    this avoids needless substituting
    
    before:
    577.76user 4.27system 7:36.13elapsed 127%CPU (0avgtext+0avgdata 1141608maxresident)k
    
    after:
    573.01user 4.04system 7:33.86elapsed 127%CPU (0avgtext+0avgdata 1141656maxresident)k
    Ariel Ben-Yehuda committed Aug 17, 2015
    Configuration menu
    Copy the full SHA
    8aeaaac View commit details
    Browse the repository at this point in the history
  4. don't iterate over all impls when none match

    before:
    573.01user 4.04system 7:33.86elapsed 127%CPU (0avgtext+0avgdata 1141656maxresident)k
    after:
    567.03user 4.00system 7:28.23elapsed 127%CPU (0avgtext+0avgdata 1133112maxresident)k
    
    an additional 1% improvement
    Ariel Ben-Yehuda committed Aug 17, 2015
    Configuration menu
    Copy the full SHA
    13809ff View commit details
    Browse the repository at this point in the history