[PATCH] speed up java.util.Random

Andrew Haley aph@redhat.com
Fri Nov 25 13:29:00 GMT 2005


Paolo Bonzini writes:

 > 2005-11-24  Paolo Bonzini  <bonzini@gnu.org>
 > 
 >          * java/util/Random.java: Rewrite, inlining the next(int) method
 >          and synchronization blocks into the callers.
 > 

I'm unhappy about this patch.

gcj is capable of inlining methods that are declared final or private.
Rather than inlining by hand, it makes far more sense to extract the
common code and compile with -O3.

The problem is that the gcj configury is (for me) hard to understand.
I'll leve it to Tom Tromey to suggest how we enable the use of -O3 on
this file.

Andrew.



More information about the Java-patches mailing list