Browse thread
Benchmarking different dispatch types
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | William D. Neumann <wneumann@c...> |
| Subject: | Re: [Caml-list] Benchmarking different dispatch types |
On Wed, 17 Jan 2007, Nathaniel Gray wrote:
> Interesting, but are they meaningful? The warnings from Benchmark are
> troubling, but I didn't have any immediate ideas on how to get rid of
> them. Any suggestions?
Well, looking at the benchmark module, it appears that message if one or
more of the following occurs:
The number of iterations is too low (default minimum = 4)
The amount of cpu time taken is too low (default minimum = 0.4 seconds)
The wallclock time was less than 1 second and the number of iterations was
less than 1000.
So either make the functions more intensive (which obscures the calling
time and thus is bad here), do more calls, or supply a smaller value for
min_cpu:
let _ =
let results = latencyN 4000000 ~min_cpu:0.1
[("function", call_f, ());
("method", call_o, ());
("closure", call_fc, ());
("obj. closure", call_foc, ())]
in
tabulate results;;
William D. Neumann
---
"There's just so many extra children, we could just feed the
children to these tigers. We don't need them, we're not doing
anything with them.
Tigers are noble and sleek; children are loud and messy."
-- Neko Case
Life is unfair. Kill yourself or get over it.
-- Black Box Recorder