X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Ftatoo.ml;h=eac804a039a27f829e787e2b900543b80c59ff9e;hb=refs%2Fheads%2Ffeature%2Ffast-multipass;hp=ca162276f8a25e2cd72442c44761551cb72d6aeb;hpb=5b19281cbcdbd1ca5f565f6cd41dcfb7e18a297a;p=tatoo.git diff --git a/src/tatoo.ml b/src/tatoo.ml index ca16227..eac804a 100644 --- a/src/tatoo.ml +++ b/src/tatoo.ml @@ -106,7 +106,8 @@ let main () = let module Naive = Run.Make(Naive_tree) in let result_list = - let root = [ Naive_tree.root doc] in + let root = Sequence.create () in + let () = Sequence.add (Naive_tree.root doc) root in let f, msg = match !Options.parallel, !Options.compose with true, true -> @@ -120,12 +121,6 @@ let main () = in time f () ("evaluating query in " ^ msg ^ " mode") in - let s = Naive.stats () in - Run.( - Logger.msg `STATS "@[tree size: %d@\ntraversals: %d@\ncache2 hit ratio: %f@\ncache5 hit ratio: %f@]" - s.tree_size s.run - (float s.cache2_hit /. float s.cache2_access) - (float s.cache5_hit /. float s.cache5_access)); time (fun () -> let count = ref 1 in List.iter (fun results -> @@ -133,10 +128,10 @@ let main () = output_string output (string_of_int !count); output_string output "\" >\n"; if !Options.count then begin - output_string output (string_of_int (List.length results)); + output_string output (string_of_int (Sequence.length results)); output_char output '\n'; end else - List.iter (fun n -> + Sequence.iter (fun n -> Naive_tree.print_xml output doc n; output_char output '\n' ) results;