develooper Front page | perl.perl5.porters | Postings from January 2001

Re: 2% speedup with Duff's device

Thread Previous | Thread Next
Nick Ing-Simmons
January 23, 2001 08:59
Re: 2% speedup with Duff's device
Message ID:
Jarkko Hietaniemi <> writes:
>On Tue, Jan 23, 2001 at 01:02:42PM +0000, Nick Ing-Simmons wrote:
>> Nicholas Clark <> writes:
>> >If one uses Duff's device in PERL_HASH, the regression tests go about 2%
>> >faster.
>> Note - that may be literally true, but is not the speed difference in perl.
>> The tests are riddled with sleep()s and other system timing overhead.
>That is true, the timing of the whole suite is to be taken with a
>biiig grain of salt -- but a test of consisting of, say, 1 second of
>actual test (CPU time being burned) and 1 second of sleep gets sped up
>by, say, 10%, it means that the CPU time really got slashed by 20%,
>which is actually *more* significant than without the sleep.

Agreed, which is what I meant. The big problem I find though is 
that you cannot measure small differences - the uncertainty of the 
test suite as a whole swamps (say) the cost of the 

  if (PL_sig_pending)

>I think the most dubious element of the test suite as a whole is the
>large number of separate and relatively small scripts, the operating
>system (and filesystem, and networking, and ...) dependent startup
>time may taint the results quite a lot.
Nick Ing-Simmons <>
Via, but not speaking for: Texas Instruments Ltd.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About