libcj java.nio.DirectBuffer is slow (no inlining)
Andrew Haley
aph@redhat.com
Tue Jun 6 16:22:00 GMT 2006
P.O. Gaillard writes:
> I am using the gcj 4.1 that came with Fedora Core 5 and the NIO
> buffers are quite slow. From what I see with Oprofile, I would say
> that this is because the code is not inlined.
It's possible. It'd be intresting to find out.
> Is it possible (safe, reasonable?) to compile libgcj with -O3 ? If
> so why is the libgcj in FC5 not compiled that way ?
I know for certain that it's a significant improvement for some of the
crypto classes. In general, however, we lack data to know if the
additional bloat justifies the increase in size.
> Also, I have noticed that inlining does not seem to happen with
> methods from other classes and non final methods. Am I right ?
Clearly, inlining non-final methods is impossible in any language
unless you do whole program compilation or some kind of
interprocedural optimization, because the methods might be overridden.
Inlining static or final methods from other classes is possible,
though.
> Gnat has the infrastructure to do inlining between separate
> compilation units with -gnatn. This can bring great performance
> improvements for code with lots of small methods. Is this feature
> also available for GCJ ?
Why not simply compile the files together? I'm not sure I see the
advantage of this at all. Perhaps you're talking about a system with
small memory?
Andrew.
More information about the Java
mailing list