mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 03:05:31 -05:00
perf: more inlining for checker
This commit is contained in:
parent
b4231d23c1
commit
bdb41fcdc7
1 changed files with 11 additions and 8 deletions
|
|
@ -65,11 +65,14 @@ end = struct
|
|||
}
|
||||
let create(): store =
|
||||
{ n=0; }
|
||||
let size self = Array.length self.atoms
|
||||
let get self i = Array.get self.atoms i
|
||||
let watches self = self.watches
|
||||
let set_watches self w = self.watches <- w
|
||||
let iter ~f self = Array.iter f self.atoms
|
||||
let[@inline] size self = Array.length self.atoms
|
||||
let[@inline] get self i = Array.get self.atoms i
|
||||
let[@inline] watches self = self.watches
|
||||
let[@inline] set_watches self w = self.watches <- w
|
||||
let[@inline] iter ~f self =
|
||||
for i=0 to Array.length self.atoms-1 do
|
||||
f (Array.unsafe_get self.atoms i)
|
||||
done
|
||||
let pp out (self:t) =
|
||||
let pp_watches out = function
|
||||
| (p,q) when p=Atom.dummy || q=Atom.dummy -> ()
|
||||
|
|
@ -85,9 +88,9 @@ end = struct
|
|||
c
|
||||
module As_key = struct
|
||||
type nonrec t=t
|
||||
let hash a = CCHash.int a.id
|
||||
let equal a b = a.id = b.id
|
||||
let compare a b = compare a.id b.id
|
||||
let[@inline] hash a = CCHash.int a.id
|
||||
let[@inline] equal a b = a.id = b.id
|
||||
let[@inline] compare a b = compare a.id b.id
|
||||
end
|
||||
module Set = CCSet.Make(As_key)
|
||||
module Tbl = CCHashtbl.Make(As_key)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue