projects
/
SXSI
/
xpathcomp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Optimized the topdown run yet again
[SXSI/xpathcomp.git]
/
ptset.ml
diff --git
a/ptset.ml
b/ptset.ml
index
3fd3d39
..
3185da4
100644
(file)
--- a/
ptset.ml
+++ b/
ptset.ml
@@
-36,7
+36,7
@@
struct
let equal x y =
match x,y with
| Empty,Empty -> true
let equal x y =
match x,y with
| Empty,Empty -> true
- | Leaf k1, Leaf k2 ->
H.equal k1
k2
+ | Leaf k1, Leaf k2 ->
k1 ==
k2
| Branch(b1,i1,l1,r1),Branch(b2,i2,l2,r2) ->
b1 == b2 && i1 == i2 &&
(HNode.equal l1 l2) &&
| Branch(b1,i1,l1,r1),Branch(b2,i2,l2,r2) ->
b1 == b2 && i1 == i2 &&
(HNode.equal l1 l2) &&
@@
-82,7
+82,7
@@
struct
let kid = H.uid k in
let rec loop n = match HNode.node n with
| Empty -> false
let kid = H.uid k in
let rec loop n = match HNode.node n with
| Empty -> false
- | Leaf j ->
H.equal k
j
+ | Leaf j ->
k ==
j
| Branch (p, _, l, r) -> if kid <= p then loop l else loop r
in loop n
| Branch (p, _, l, r) -> if kid <= p then loop l else loop r
in loop n
@@
-145,7
+145,7
@@
END
let kid = H.uid k in
let rec ins n = match HNode.node n with
| Empty -> leaf k
let kid = H.uid k in
let rec ins n = match HNode.node n with
| Empty -> leaf k
- | Leaf j -> if
H.equal j
k then n else join kid (leaf k) (H.uid j) n
+ | Leaf j -> if
j ==
k then n else join kid (leaf k) (H.uid j) n
| Branch (p,m,t0,t1) ->
if match_prefix kid p m then
if zero_bit kid m then
| Branch (p,m,t0,t1) ->
if match_prefix kid p m then
if zero_bit kid m then
@@
-161,7
+161,7
@@
END
let kid = H.uid k in
let rec rmv n = match HNode.node n with
| Empty -> empty
let kid = H.uid k in
let rec rmv n = match HNode.node n with
| Empty -> empty
- | Leaf j -> if
H.equal k
j then empty else n
+ | Leaf j -> if
k ==
j then empty else n
| Branch (p,m,t0,t1) ->
if match_prefix kid p m then
if zero_bit kid m then
| Branch (p,m,t0,t1) ->
if match_prefix kid p m then
if zero_bit kid m then