Throwing exceptions is a whole lot slower.  But for what it's worth the cost of 
try/except though is much cheaper on IronPython if no exception is thrown.  
Here's the exception results on PyBench.  Note these are actually results I 
happen to have on my machine from a while ago - but nothing's been done to 
change this part of the perf story in some time:

         TryExcept:    56ms     3ms +1938.4%    56ms     6ms +830.4%
    TryRaiseExcept:    88ms  2543ms  -96.6%    88ms  2556ms  -96.5%

Cpython took 88ms, IronPython took 2543ms.  And clearly throwing exceptions is 
quite expensive.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Davy Mitchell
Sent: Thursday, February 21, 2008 4:55 AM
To: Discussion of IronPython
Subject: Re: [IronPython] Slow Performance of CPython libs?

On Thu, Feb 21, 2008 at 12:35 PM, Birsch <[EMAIL PROTECTED]> wrote:
> quite a few [python] exceptions during __init__. Does IronPython handle
> exceptions significantly slower than CPtyhon?

This has been my experience - I've worked round it by editing modules
to avoid nasty bits.
Not always practical but saved many seconds in my case.

Cheers,
Davy

--
Davy Mitchell
Blog - http://www.latedecember.co.uk/sites/personal/davy/
Twitter - http://twitter.com/daftspaniel
Skype - daftspaniel needgod.com
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to