]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #37152 - arielb1:drop-cache, r=pnkfelix
authorbors <bors@rust-lang.org>
Sat, 15 Oct 2016 22:38:52 +0000 (15:38 -0700)
committerGitHub <noreply@github.com>
Sat, 15 Oct 2016 22:38:52 +0000 (15:38 -0700)
add a per-param-env cache to `impls_bound`

There used to be only a global cache, which led to uncached calls to
trait selection when there were type parameters.

This causes a 20% decrease in borrow-checking time and an overall 0.5% performance increase during bootstrapping (as borrow-checking tends to be a tiny part of compilation time).

Fixes #37106 (drop elaboration times are now ~half of borrow checking,
so might still be worthy of optimization, but not critical).

r? @pnkfelix

1  2 
src/librustc/ty/mod.rs
src/librustc_typeck/check/mod.rs

Simple merge
Simple merge