Interface method calls are slow.
Per Bothner
per@bothner.com
Tue Nov 16 23:35:00 GMT 1999
Alexandre Petit-Bianco <apbianco@cygnus.com> writes:
> That's a gcc architecture issue. I think this could be changed in the
> front-end. I'll file a PR for that.
To avoid misunderstandings: Inlining should be done in the "front-end"
(i.e. using trees instead of rtl), but it should be done by the
language-independent parts of Gcc (so every front-end doesn't have to
duplicate this code). [This ties in with the general goal of moving
Gcc to represent whole functions or even whole programs using trees,
and doing more optimizations at the tree level.]
> > Also, inlining (final, static) methods across class boundaries does
> > not yet seem to work.
>> I don't know if that's fixable. The C++ compiler goes away with that
> because inline methods are declared in file included by every
> compilation unit that requires them -- I believe. I'll have to check
> with the C++ team.
If we're talking about Java code, it doesn't really have anything
to do with the C++ compiler. If the classes whose methods we're
calling are given from Java source, we just need to remember the
trees for final/static methods we might want to inline, even if
they are in other classes. If the classes are available from
bytecode, we need to make sure that inline rtl is generated and
saved; if that is not already happening, it is probably some
simple thing that needs to be fixed.
--
--Per Bothner
per@bothner.com http://www.bothner.com/~per/
More information about the Java
mailing list