This removes checks in `Lean.Meta.reduceNat?` that caused it to fail on terms it could handle because they contain meta variables in arguments. This lead to those operations being reduced using their equational definitions and slow performance on large patterns: ``` set_option profiler true set_option profiler.threshold 1 def testMod (x:Nat) := match x with | 128 % 1024 => true | _ => false -- elaboration took 3.02ms def testMul (x:Nat) := match x with | 128 * 1 => true | _ => false -- type checking took 11.1ms -- compilation of testMul.match_1 took 313ms -- compilation of testMul took 65.7ms -- elaboration took 58.9ms ``` Performance is slower on `testMul` than `testMod` because `whnf` ends up evaluateing `128 * 1` using Peano arithmetic while `128 % 1024` is able to avoid that treatment since `128 < 1024`. |
||
|---|---|---|
| .. | ||
| anonymous_constructor_error_msg.lean | ||
| bind_with_existential_types.lean | ||
| equation_compiler_slow_with_many_constructors.lean | ||
| equation_compiler_slow_with_many_constructors2.lean | ||
| error_aux_decl_exists.lean | ||
| ImplicitLambdas.lean | ||
| invalid_field_notation_error_msg.lean | ||
| issues1.lean | ||
| issues2.lean | ||
| issues3.lean | ||
| issues4.lean | ||
| issues5.lean | ||
| issues6.lean | ||
| issues7.lean | ||
| issues8.lean | ||
| leaky_tmp_metavars.lean | ||
| leaky_tmp_metavars2.lean | ||
| let_destruct_inside_forall.lean | ||
| namespace_vs_prefix.lean | ||
| nested_namespace_vs_prefix.lean | ||
| overload_with_list_coercion.lean | ||
| patternIssue.lean | ||
| private.lean | ||
| ProjNotation.lean | ||
| reduceNatWithMeta.lean | ||
| Reid1.lean | ||
| structInst.lean | ||
| structure_same_names2.lean | ||
| typeclass_nested_validate.lean | ||
| typeclass_triggers_typeclass.lean | ||
| typeclasses_with_emetavariables.lean | ||
| typeclasses_with_preconditions.lean | ||
| typeclasses_with_umetavariables.lean | ||
| variable_universe_bug.lean | ||
| vars.lean | ||
| zmod.lean | ||