(* Uncomment me let l = lazy (1+1) let _ = Lazy.force l *) let fixit = ref 0 let test_lazy n = let l = lazy (n+1) in fixit := Lazy.force l let test_closure n = let c = (fun _ -> n+1) in fixit := c () let test n test = let start = Sys.time () in for i=0 to n do test i done; (Sys.time ()) -. start let result = List.map (test 1000000) [test_lazy; test_closure] let _ = List.iter print_endline (List.map string_of_float result)