Charles Oliver Nutter wrote:

> Exception handling is quite fast. See John Rose's post "longjumps 
> considered inexpensive" for information about how 
> exceptions-as-flow-control can be almost as cheap as local flow control. 
> In the case of HotSpot, if the throw and catch are close enough together 
> in the stack they can even be jitted as a jump. Crazy.
> 
> .NET's slow exceptions will seriously burn implementations like 
> IronRuby, which must use them for stack-unrolling non-local flow control 
> features.


I agree and confirm.  In PyPy we use exceptions to model control flow a 
lot, and the very first version of PyPy for .NET was very very slow due 
to this. To solve, we had to implement our own inliner that was able to 
remove most of the simple try/catch used to control flow, and this gave 
a speedup of about 10x.

By contrast, PyPy for JVM gives best result when we completely disable 
inlining, because hotspot can do most of that optimizations by itself.

ciao,
Anto

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to