Commits

camlspotter committed c0a1fb1

pure test

  • Participants
  • Parent commits f2991ae
  • Branches p4hack

Comments (0)

Files changed (2)

 
 OCAMLFLAGS    += -annot -w Ae
 OCAMLCFLAGS   +=
-OCAMLOPTFLAGS +=
+OCAMLOPTFLAGS += -p
 OCAML_LINK_FLAGS +=
 OCAML_BYTE_LINK_FLAGS +=
 OCAML_NATIVE_LINK_FLAGS +=

ocaml/lexertest.ml

       time_orig time_planck
   in
 
-  Arg.parse [] (fun path ->
+  let with_orig = ref false in
+  Arg.parse ["-compare", Arg.Set with_orig, " profiling with the original" ] (fun path ->
     let ic = open_in path in
     let stream = Input.Stream.from_chan ~filename:path ic in
     let token_stream = Lex.ocaml_token_stream stream in
 
     Format.eprintf "%s@." path;
 
-    let (), time_orig = with_time parse_orig path in
+    let (), time_orig = 
+      if !with_orig then with_time parse_orig path  else (), 0.0
+    in
     let (), time_planck = with_time parse token_stream in
     time_sum_orig := !time_sum_orig +. time_orig;
     time_sum_planck := !time_sum_planck +. time_planck;