end
- module TransCacheOld =
+ module TransCache =
struct
external get : 'a array -> int ->'a = "%array_unsafe_get"
external set : 'a array -> int -> 'a -> unit = "%array_unsafe_set"
let add (h : t) tag slist (data : fun_tree) =
let tab = get h (Uid.to_int slist.SList.Node.id) in
let tab = if tab == dummy_cell then
- let x = Array.create 10000 dummy in
+ let x = Array.create 100000 dummy in
(set h (Uid.to_int slist.SList.Node.id) x;x)
else tab
in
end
- let td_trans = TransCache.create 10000 (* should be number of tags *number of states^2
+ let td_trans = TransCache.create 100000 (* should be number of tags *number of states^2
in the document *)
let empty_size n =
let hash t = Uid.to_int t.Formlistlist.Node.id
end)
- module Fold2ResOld = struct
+ module Fold2Res = struct
external get : 'a array -> int ->'a = "%array_unsafe_get"
external set : 'a array -> int -> 'a -> unit = "%array_unsafe_set"
external field1 : 'a -> 'b = "%field1"
let v = Obj.repr ((),2,()) in
Obj.magic v
- let create n = Array.create n dummy
+ let create n = Array.create n dummy
let find h tag fl s1 s2 =
let af = get h tag in
if af == dummy then raise Not_found
if as1 == dummy then raise Not_found
else
let as2 = get as1 (Uid.to_int s1.SList.Node.id) in
- if as2 == dummy then raise Not_found
- else let v = get as2 (Uid.to_int s2.SList.Node.id) in
- if field1 v == 2 then raise Not_found
- else v
+ if as2 == dummy then raise Not_found
+ else
+ let v = get as2 (Uid.to_int s2.SList.Node.id) in
+ if field1 v == 2 then raise Not_found
+ else
+ v
+
let add h tag fl s1 s2 data =
let af =
let x = get h tag in
if x == dummy then
begin
- let y = Array.make 10000 dummy in
+ let y = Array.make 100000 dummy in
set h tag y;y
end
else x
let x = get af (Uid.to_int fl.Formlistlist.Node.id) in
if x == dummy then
begin
- let y = Array.make 10000 dummy in
+ let y = Array.make 100000 dummy in
set af (Uid.to_int fl.Formlistlist.Node.id) y;y
end
else x
let x = get as1 (Uid.to_int s1.SList.Node.id) in
if x == dummy then
begin
- let y = Array.make 10000 dummy_val in
+ let y = Array.make 100000 dummy_val in
set as1 (Uid.to_int s1.SList.Node.id) y;y
end
else x
end
+
+
- module Fold2Res3 = struct
+ module Fold2Res2 = struct
include Hashtbl.Make(struct
type t = Tag.t*Formlistlist.t*SList.t*SList.t
let equal (a,b,c,d) (x,y,z,t) =
find h (t,f,s1,s2)
end
- module Fold2Res =
+ module Fold2ResOld =
struct
type cell = { key : int;
obj : Obj.t }
(*|`TAG(tag') ->
let default = fun t _ -> eval_fold2_slist fl_list t (Tree.tag tree t) empty_res
(loop_tag tag' (first t) llist t )
- in default (*
+ in
let cf = SList.hd llist in
if (slot_size == 1) && StateSet.is_singleton cf
then
then
RS.mk_quick_tag_loop default llist 1 tree tag'
else default
- else default *) *)
+ else default *)
| _ ->
(fun t _ -> eval_fold2_slist fl_list t (Tree.tag tree t) empty_res
(loop (first t) llist t ))