lean4-htt/tests/lean/run/bv_math_lit_perf.lean
Leonardo de Moura d8d64f1fc0
perf: isDefEq performance issue (#3807)
Fixes a performance problem found by @hargoniX while working on LeanSAT.
2024-03-30 02:15:48 +00:00

22 lines
352 B
Text

open BitVec
def f (x : BitVec 32) : Nat :=
match x with
| 10#32 => 0
| 100#32 => 2
| 200#32 => 3
| 300#32 => 4
| 400#32 => 5
| 500#32 => 6
| 600#32 => 7
| 700#32 => 8
| 800#32 => 9
| 900#32 => 10
| 910#32 => 11
| 920#32 => 12
| _ => 1000
set_option maxHeartbeats 3000
example : f 500#32 = x := by
simp [f]
sorry