[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH] Change setjmp/longjmp to _setjmp/_longjmp
From: |
Jim Ursetto |
Subject: |
Re: [Chicken-hackers] [PATCH] Change setjmp/longjmp to _setjmp/_longjmp to avoid overhead and fix signal masking bug |
Date: |
Wed, 13 Jun 2012 20:34:14 -0500 |
On Jun 13, 2012, at 7:28 PM, Mario Domenech Goulart wrote:
> Unfortunately I could not observe any improvement on Linux x86. The
> performance is actually slightly worse with your patch (using master,
> c48a109d668f3186bb4a213940c0b0b81a1ad03d). I run the benchmarks with no
> csc options and with -O3. Here are the results ([2] is the chicken with
> the _setjmp/_longjmp patch):
There won't be any improvement on Linux because _setjmp == setjmp;
Linux doesn't save the signal mask on setjmp() unless the obscure __FAVOR_BSD
is #defined. The performance regression you observed could just be
statistical noise as well -- but, sometimes gcc will inline known calls
and it might do that for setjmp and not _setjmp, even though setjmp is
just a macro alias for _setjmp. Only way to be sure is to look at the
assembly output.
Other than figuring that out, it would be a good idea to test on mingw
and OS X (I was going to do this). However testing on other platforms
like cygwin or Solaris (or more obscure?) is problematic. It is not
really a question of whether _setjmp works but if every platform supports
_setjmp. I don't know if this is something to throw in before the
release, if one is coming soon, unless we are going to test every
supported platform before release. Anyone else?
JIm