mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 11:15:43 -05:00
fix: small perf improvement
This commit is contained in:
parent
39ed753b38
commit
a6f6a99fb3
1 changed files with 3 additions and 5 deletions
|
|
@ -209,15 +209,13 @@ module Make_inner
|
||||||
(fun y -> if Var.compare x y = 0 then Q.one else Q.zero)
|
(fun y -> if Var.compare x y = 0 then Q.one else Q.zero)
|
||||||
t.nbasic
|
t.nbasic
|
||||||
|
|
||||||
(* TODO: avoid double lookup in maps *)
|
|
||||||
(* find expression of [x] *)
|
(* find expression of [x] *)
|
||||||
let find_expr_total (t:t) (x:var) : Q.t Vec.vector =
|
let find_expr_total (t:t) (x:var) : Q.t Vec.vector =
|
||||||
if mem_basic t x then
|
match find_expr_basic_opt t x with
|
||||||
find_expr_basic t x
|
| Some e -> e
|
||||||
else (
|
| None ->
|
||||||
assert (mem_nbasic t x);
|
assert (mem_nbasic t x);
|
||||||
find_expr_nbasic t x
|
find_expr_nbasic t x
|
||||||
)
|
|
||||||
|
|
||||||
(* compute value of basic variable.
|
(* compute value of basic variable.
|
||||||
It can be computed by using [x]'s definition
|
It can be computed by using [x]'s definition
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue