X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=utils.ml;h=36334f6a5b77dd9083ca2ab0d36d0659f0df70c9;hb=ac8720a930e5757a72f73e80aff7a988b0082831;hp=69754f55a669f4ee37ea855665e39c446ee33fc1;hpb=d046f2b9d8e39b30350399eafe122c30ff61c8c1;p=SXSI%2Fxpathcomp.git diff --git a/utils.ml b/utils.ml index 69754f5..36334f6 100644 --- a/utils.ml +++ b/utils.ml @@ -46,6 +46,9 @@ DEFINE SMALL_H_SIZE = PRIME2 DEFINE MED_H_SIZE = PRIME5 DEFINE BIG_H_SIZE = PRIME8 +DEFINE SMALL_A_SIZE = 128 +DEFINE MED_A_SIZE = 2048 +DEFINE BIG_A_SIZE = 8192 let read_procmem () = @@ -89,10 +92,9 @@ let time f ?(count=1) x = let r = f x in let t2 = Unix.gettimeofday () in let t = (1000. *. (t2 -. t1)) in - if i > count then (l:= t::!l;r) - else begin Printf.eprintf "run %i/%i, %fms\n%!" i count t; - loop (i+1) end + if i >= count then (l:= t::!l;r) + else loop (i+1) in loop 1 ;; let total_time () = List.fold_left (+.) 0. !l;;