简体   繁体   English

java的实现?

[英]java implementations?

i've been looking at shoootout alioth benchmarks http://shootout.alioth.debian.org/ , there is mention of two different "java"'s what is the difference between them? 我一直在查看shoootout alioth基准测试http://shootout.alioth.debian.org/ ,其中提到了两个不同的“ java”,它们之间有什么区别?

(java xint and java server) (java xint和java服务器)

i know a little bit of java (learned in a summer class .. just basics) 我知道一点点Java(在夏季课程中学习..只是基础知识)

just curious about this .. 对此很好奇..

thanx in advance .. 提前谢谢..

There are multiple implementations of Java (see OpenJDK , Apache Harmony , Jikes, etc. etc.), but what you're talking about: java server and java xint are not separate Java versions. Java有多种实现(请参见OpenJDKApache Harmony ,Jikes等),但是您java xint是: java serverjava xint不是独立的Java版本。 -Xint and -server are two different command line arguments you can pass to the java runtime. -Xint-server是可以传递给java运行时的两个不同的命令行参数。

Here's -Xint 这是-Xint

-Xint

Operate in interpreted-only mode. 在仅解释模式下操作。 Compilation to native code is disabled, and all bytecodes are executed by the interpreter. 禁止对本机代码进行编译,并且所有字节码均由解释器执行。 The performance benefits offered by the Java HotSpot Client VM's adaptive compiler will not be present in this mode. Java HotSpot客户端VM的自适应编译器提供的性能优势在这种模式下将不存在。

Here' -server argument: 此处-server参数:

-server

Select the Java HotSpot Server VM. 选择Java HotSpot服务器VM。 On a 64-bit capable jdk only the Java HotSpot Server VM is supported so the -server option is implicit. 在支持64位的jdk上,仅支持Java HotSpot Server VM,因此-server选项是隐式的。 This is subject to change in a future release. 这可能会在将来的版本中更改。

For default VM selection, see Server-Class Machine Detection 有关默认的VM选择,请参阅服务器级计算机检测

The "xint" and "server" variants are just different command-line options for the Java Hotspot virtual machine. 对于Java Hotspot虚拟机,“ xint”和“ server”变体只是不同的命令行选项。

  • The "-xint" option tells HotSpot to disable native code compilation, and use the bytecode interpreter to execute all code. “ -xint”选项告诉HotSpot禁用本机代码编译,并使用字节码解释器执行所有代码。 You don't do this with production code. 您不需要使用生产代码来执行此操作。 In this case, the benchmarks are (I guess) aiming to show what happens when you try to minimize startup times. 在这种情况下,基准测试(我想)旨在显示尝试最小化启动时间时发生的情况。

  • The "-server" option selects HotSpot settings that are tuned for long running applications. “-服务器”选项选择针对长时间运行的应用程序调整的HotSpot设置。 Compared with "-client", it takes longer for the HotSpot to decide to JIT compile a particular method ... but the JIT compiler can then do a better job of optimizing. 与“ -client”相比,HotSpot决定JIT编译特定方法所花费的时间更长……但是JIT编译器则可以更好地进行优化。 (The net result is slower startup, but better long-term performance.) (最终结果是启动速度较慢,但​​长期性能更好。)

    IIRC, the benchmarks are then run a number of times to "warm up" the JVM before the actual timings are measured. 然后,在IIRC中运行基准测试多次,以在对实际计时进行测量之前“预热” JVM。 The idea is to take startup times out of the equation. 这个想法是要消除启动时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM