This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: Help with performance issues.
Bill wrote:
> The code spends most of it's time in various loops that look roughly like:
>
> while( list != null ) {
> for( int i=list.data_offset;
> i < MAX && Math.abs(list.data[i]-input[i]) < ERR;
> i++ )
> ;
Sun's JIT is almost certainly inlining Math.abs() and we probably aren't.
Try replacing this with a static final method in your class to see if it
gets inlined (put it before this method in your class definition).
It seems like gcj should be able to replace Math.abs() with __builtin_abs in
this case. Does anybody think otherwise?
AG