This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Help with performance issues.


>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:

>> I think we could consider doing this for any final method with fixed
>> semantics.  For instance, anything in java.lang.Math (taking strictfp
>> concerns into account, of course).  If other final methods are
>> important for performance, we could inline those too.  For instance,
>> there might be situations where inlining System.arraycopy makes sense.

Andrew> All this falls down, though, when we need to inline a *native*
Andrew> method.  That would be a good trick...

In the above case (final methods with fixed semantics), we can do
this.  That's because we aren't "inlining" -- we are recognizing the
name of the function and replacing the call with a builtin (or with
the equivalent code).  So for instance we could replace Math.cos with
__builtin_cos.  Ditto Math.max(double,double), etc.

Inlining C++ into Java would be hard.  We could either merge the
compilers, or we could do link-time inlining.  These both seem
dauntingly hard.

Inlining Java into C++ can be done much more easily.  We could replace
the trivial decompilation code in gcjh with a real decompiler.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]