Nick Ing-Simmons wrote: > How do I get a measure of what sigsetjmp() is costing. > A very simplistic test gave > > With sigsetjmp(): > All tests successful. > u=0.9 s=0.85 cu=72.37 cs=34.45 scripts=275 tests=21137 > > With setjmp(): > All tests successful. > u=1 s=0.75 cu=74.35 cs=35.23 scripts=275 tests=21137 Anything that causes JMPENV_PUSH to be called, eg eval. Ilya did some work on this the back end of last year, and his tests indicated a significant speedup in object creation by switching from sigsetjmp to setjmp - see http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-12/msg00798.html, there is some test code in there. Here is another noddy test: $ time /perl -e 'for ($i=100000;$i;$i--) { eval "die" }' With sigsetjmp real 0m28.70s user 0m25.81s sys 0m2.76s With setjmp real 0m24.20s user 0m23.93s sys 0m0.02s A 15% difference. With XS code you can push a bit harder, so the difference is more marked. My app does lots and lots of XS-based object creation/destruction, so I see about 18%. Alan BurlisonThread Previous | Thread Next