java aliasing rules
Bryce McKinlay
bryce@waitaki.otago.ac.nz
Fri Apr 5 01:07:00 GMT 2002
Jeff Sturm wrote:
>On Fri, 5 Apr 2002, Bryce McKinlay wrote:
>>>Turning it off (although note that currently it isn't *on* in the first
>>place ;-) should be as simple as turning off -fnon-call-exceptions. Then
>>dereferences won't have flow edges and things can be reordered across
>>them. Unfortunately that will also have the side-effect of not
>>generating unwind info for leaf functions.
>>>>Well, sure... leaf functions have no use for unwind info if they will
>never throw.
>
Right but you get an abort instead of a NullPointerException with maybe
not-quite-perfect semantics. Probibly this is easily fixed though.
>>I'd actually be fairly surprised if you were able to measure any large
>>difference in performance between the two. Note that hopefully a
>>dereference will only have an edge the first time it is dereferenced.
>>>>Agreed. It may be hard to measure all right, I find that "real" Java
>programs usually suffer from other bottlenecks like synchronization or GC.
>>For that matter I don't know if there are any large general improvements
>to be made in gcj. Most of the low-hanging fruit are gone.
>
I think major improvements can still be made to type checking, both by
avoiding them and speeding them up in the first place (ie inlining the
simple ones and optimizing the layout of class info). Method inlining
could be vastly improved. Automatic bounds check elimination could speed
things up a lot. I have a patch to do inline divide checking instead of
using the divide subroutine which speeds some tests up by 4X on powerpc.
regards
Bryce.
More information about the Java
mailing list