[Shootout-list] Timing resolution? libbsd-resource-perl
Isaac Gouy
igouy2@yahoo.com
Mon, 9 Aug 2004 12:44:58 -0700 (PDT)
--- Einar Karttunen <ekarttun@cs.helsinki.fi> wrote:
> 1) runtime system startup - should be deleted from the score.
> 2) initialisation for the looping - may be very large.
> 3) N*actual loop costs.
> 4) garbage collection and other background tasks of the runtime
> system.
>
> e.g. for language A) they might be (1) deleted:
> 2) 0.0 3) 0.1 4) 0
> and results: N=10 -> 1, N=100 -> 10, N=1000 -> 100
>
> and for language B)
> 2) 10 3) 0.01 4) 0.01
> N=10 -> 10, N=100 -> 11, N=1000 -> 20
>
> Is A or B better in this test?
imo To answer that question we must be specific about N.
imo It is reasonable to say that A is better for N=10 and B is better
for N=1000.
> Deciding what to measure and how is more important than
> finicly resolution.
Well, I still don't know what time-resolution is provided by Perl
times() or the libbsd times().
As puzzling is the order of languages with the same CPU measurement,
for example Ackermann:
clean 0.02 444 10
oberon2 0.02 1128 14
mlton 0.02 588 16
gcc 0.02 352 9
g++ 0.02 800 8
They aren't sorted by name, or by mem usage, or by LOCs.
So is the order arbitrary?
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail