[Bug java/23283] Sun's JIT faster than gcc for Random.nextDouble

mark at klomp dot org gcc-bugzilla@gcc.gnu.org
Tue Aug 23 14:31:00 GMT 2005


------- Additional Comments From mark at klomp dot org  2005-08-23 14:31 -------
Subject: Re:  Sun's JIT faster than gcc for
	Random.nextDouble

It looks like the problem is that we don't remove the synchronization
for nextDouble() even though the test case is single-threaded.

qprof: /tmp/x: 299 samples, 299 counts
X::main(JArray<java::lang::String*>*):X.java:8       5      (  2%)
libc.so.6(memchr)                                    1      (  0%)
libgcj.so.6                                          2      (  1%)
libgcj.so.6(_Jv_MonitorEnter)                        110    ( 37%)
libgcj.so.6(_Jv_MonitorExit)                         108    ( 36%)
libgcj.so.6(_ZN4java4util6Random4nextEi)             27     (  9%)
libgcj.so.6(_ZN4java4util6Random10nextDoubleEv)      46     ( 15%)




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23283



More information about the Java-prs mailing list