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

Re: Does perl really need to use sigsetjmp? (18% performance hit)

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
January 11, 2001 07:47
Subject:
Re: Does perl really need to use sigsetjmp? (18% performance hit)
Message ID:
200101111546.PAA20931@mikado.tiuk.ti.com
Alan Burlison <Alan.Burlison@uk.sun.com> writes:
>> Can you tell me if passing 0 to sigsetjmp(b,0) is significantly slower
>> than setjmp() for you ? (Solaris, OS/2)
>
>Solaris/sparc
>$ jmp
>Loop overhead: 22 ns/iter
>setjmp(jb): 32 ns/call
>sigsetjmp(sjb, 0): 11795 ns/call
>sigsetjmp(sjb, 1): 11856 ns/call

Many thanks. 

It was a thought ... - more #if-ery will be required.

Linux (laptop 360MHz) with modified program (attached) gives:

Loop overhead: 16 ns/iter
setjmp(jb): 101 ns/call
sigsetjmp(sjb, 0): 101 ns/call
sigsetjmp(sjb, 1): 1288 ns/call

Mods to program are to provide medium-res time function and bump 
loop count to compensate.

-- 
Nick Ing-Simmons <nik@tiuk.ti.com>
Via, but not speaking for: Texas Instruments Ltd.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About