Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (19 sloc) 0.48 kb
open Lwt
open Printf
let with_time i label fn =
let t1 = OS.Clock.time () in
fn ();
let t2 = OS.Clock.time () in
printf "%s,%d,%d,%.3f\n%!" Sys.os_type i label (t2 -. t1)
let main () =
(* Gc.set { (Gc.get ()) with Gc.verbose = 0x3 };; *)
let sizes = [100; 500; 1000; 5000; 10000 ] in
List.iter (fun sz ->
with_time sz sz (fun () ->
for i = 0 to 100000000 do
let p = String.create sz in
(ignore p)
done
)
) sizes;
return ()
Jump to Line
Something went wrong with that request. Please try again.