This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/23283] Sun's JIT faster than gcc for Random.nextDouble
- From: "mark at klomp dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Aug 2005 14:31:45 -0000
- Subject: [Bug java/23283] Sun's JIT faster than gcc for Random.nextDouble
- References: <20050808100453.23283.netzberg@gmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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