projects
/
SXSI
/
xpathcomp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed nasty garbage collector setting
[SXSI/xpathcomp.git]
/
utils.ml
diff --git
a/utils.ml
b/utils.ml
index
69754f5
..
36334f6
100644
(file)
--- 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 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 () =
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
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;
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;;
in loop 1
;;
let total_time () = List.fold_left (+.) 0. !l;;