1
Fork 0

Upgrade to ena-0.13.1 and use the new inlined_probe_value function.

This is a big speed win for `keccak` and `inflate`.
This commit is contained in:
Nicholas Nethercote 2019-09-20 11:23:47 +10:00
parent acf7d4dcdb
commit 3eae7f6291
4 changed files with 13 additions and 6 deletions

View file

@ -1609,20 +1609,21 @@ impl<'a, 'tcx> ShallowResolver<'a, 'tcx> {
use self::type_variable::TypeVariableValue;
// See the comment in `shallow_resolve()`.
match self.infcx.type_variables.borrow_mut().probe(v) {
match self.infcx.type_variables.borrow_mut().inlined_probe(v) {
TypeVariableValue::Known { value: t } => self.fold_ty(t) != typ,
TypeVariableValue::Unknown { .. } => false,
}
}
ty::Infer(ty::IntVar(v)) => {
match self.infcx.int_unification_table.borrow_mut().probe_value(v) {
match self.infcx.int_unification_table.borrow_mut().inlined_probe_value(v) {
Some(v) => v.to_type(self.infcx.tcx) != typ,
None => false,
}
}
ty::Infer(ty::FloatVar(v)) => {
// Not `inlined_probe_value(v)` because this call site is colder.
match self.infcx.float_unification_table.borrow_mut().probe_value(v) {
Some(v) => v.to_type(self.infcx.tcx) != typ,
None => false,