speed of simple loops: comparison to other language
Rémi Forax
forax at univ-mlv.fr
Thu Jul 1 06:42:27 PDT 2010
Le 01/07/2010 15:30, Osvaldo Doederlein a écrit :
> Hi,
>
> On 30.06.10, John Pampuch wrote:
> >
> > If you are using the same code generation (see further down),
> this may be
> > a combination of the reduced number of registers available in 32
> bit mode,
> > combined with some anomaly of the benchmarks that allow Java to fit
> > critical fields more fully into registers in the 64 bit mode.
>
> What anomoly would that be?
>
>
> Perhaps the single "anomaly" in these tests, is the fact that the
> 64-bit HotSpot doesn't have a Client VM, so it uses the Server VM by
> default. This is constant cause of benchmark confusion because the
> 32-bit VM will default to the Client VM, which has a weaker code
> optimizer. A fair comparison should use "-server" on the 32-bit VM.
>
> The efficiency of complex code hangs on the choice of algorithm,
> the level
> where programmers should concern themselves.
>
> But if such a simple operation as aritmetic iterations is slow, it
> will be
> very hard for Java to compete efficiency-wise on any level.
>
>
> The simpler Client VM is a well-known tradeoff. It has substantial
> advantages in both memory usage and startup time. The Server VM is the
> only one that really competes with C/C++, but it's much more
> heavy-weight. And even with the Client VM being the default in the JRE
> installed in hundreds of millions of consumer PCs, Java already has a
> bad rep for its loading time and resource usage (although Sun/Oracle
> has been sweating to reduce these issues since JDK 6u10). This makes
> easy to understand the reason that Server is not the default, and it
> won't be any time soon. In fact, the only reason that a 64-bit port of
> the Client VM is not available, is that 64-bit consumer/desktop stuff
> is generally not very widespread yet (most browsers are 32-bit;
> there's no 64-bit port of other plugins like Adobe flash, etc.). But I
> hope this will change soon, I'd kill for a 64-bit JRE that includes
> the Client VM so I can make my Windows7-64 setup more "pure".
no need to kill someone :)
jdk7 has a 64bit client VM.
http://bugs.sun.com/view_bug.do?bug_id=6459804
>
> On Java competitiveness, with the client VM we're talking about
> desktop software for which resource usage and startup time are at
> least as critical as speed, so the Client VM is the right choice (or
> at least, the best possible choice with the Sun/Oracle JDK; for an
> alternative that approaches a combination of Client-like resource
> usage with Server-like optimization [but then has other tradeoffs],
> look at the JET static compiler). People who run Java servers know
> that they must put "-server" in the launch scripts, then all is well.
>
>
> A+
> Osvaldo
Rémi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20100701/bb7a5dae/attachment.html
More information about the hotspot-compiler-dev
mailing list