Forum: Ruby Newbie question about benchmarking

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Stephen E Riley (Guest)
on 2007-02-24 03:30
(Received via mailing list)
Hi,

I'm trying one of Dave T.' CodeKanta exercises (binary chop) and
am curious about the benchmarking results, in particular the
rehearsal/final results for chop and chop1. The relationship  is
consistent over multiple runs of the benchmark.

I have two questions: 1) why the switch in relative position; and 2)
what might cause the first two 'chops' to show such dramatic drops
between rehearsal/actual runs and the lack of movement for the last
two 'chops'.

Regards,

Steve

Rehearsal ------------------------------------------------------
chop                 7.375000   0.016000   7.391000 (  7.388000)
chop1               12.406000   0.000000  12.406000 ( 12.433000)
chop2                0.844000   0.000000   0.844000 (  0.844000)
chop3                0.812000   0.000000   0.812000 (  0.812000)
-------------------------------------------- total: 21.453000sec

                         user     system      total        real
chop                 1.203000   0.000000   1.203000 (  1.203000)
chop1                0.797000   0.000000   0.797000 (  0.797000)
chop2                0.844000   0.000000   0.844000 (  0.843000)
chop3                0.750000   0.000000   0.750000 (  0.750000)
This topic is locked and can not be replied to.