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:
Tim Bunce
Date:
January 22, 2001 03:38
Subject:
Re: Does perl really need to use sigsetjmp? (18% performance hit)
Message ID:
20010122113730.H8453@ig.co.uk
On Sat, Jan 20, 2001 at 07:15:30PM +0000, nick wrote:
> Nicholas Clark <nick@ccl4.org> writes:
> >Using Nick's linux timer function on BSD:
> >
> >cc -O -pipe  jmp.c  -o jmp
> >
> >Loop overhead: 597 ns/iter
> >setjmp(jb): 8032 ns/call
> >sigsetjmp(sjb, 0): 2438 ns/call
> >sigsetjmp(sjb, 1): 8173 ns/call
> >
> >cc -O2 -o jmp jmp.c
> >
> >Loop overhead: 17 ns/iter
> >setjmp(jb): 32171 ns/call
> >sigsetjmp(sjb, 0): 51 ns/call
> >sigsetjmp(sjb, 1): 31795 ns/call
> >
> >this is with:
> >gcc version 2.95.2 19991024 (release)
> >FreeBSD plum.flirble.org 4.2-STABLE FreeBSD 4.2-STABLE #0: Tue Dec  5 16:05:22 GMT 2000     james@plum.flirble.org:/usr/obj/usr/src/sys/PLUM  i386
> >
> >What is the optimiser up to?
> 
> I don't know - but I suggest you find out - because current sources 
> use setjmp(). 

Perhaps sigsetjmp is a macro that tests the second arg.

Tim.

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