libjava status on Tru64 UNIX V5.1
Bryce McKinlay
bryce@waitaki.otago.ac.nz
Fri Mar 22 17:00:00 GMT 2002
Andrew Haley wrote:
>Jeff Sturm writes:
> > On 2002年3月21日, Andrew Haley wrote:
> > > > But what's the impact of sjlj exceptions on C++ (performance or otherwise)?
> > >
> > > Neither are good: I don't know which is worse.
> >
> > My naive guess that -fcheck-references is worse because it's going to
> > impact nearly every method, whereas try...catch blocks are relatively
> > infrequent (at least in my code).
>>Yes, but -fcheck-references doesn't require -fnon-call-exceptions,
>which also has fairly serious consequences for every method.
>
In theory non-call-exceptions could inhibit some optimizations, but in
practice based on my testing there is *no* difference in generated code
(on PowerPC at -O2) for either C++ or Java from changing this flag,
except for extra unwind tables being generated for leaf functions.
-fcheck-references on the other hand results in a ~20 - 40% performance
hit on scimark and sieve, plus substantially increased code size.
Even if -fnon-call-exceptions did cause pessimisation (eg inhibiting
code motion), I don't see why -fcheck-references won't do this as well.
The EH edges are still going to be there because you have the
possibility of a branch to a throw at every dereference.
regards
Bryce.
More information about the Java
mailing list