avatar
j*o
1
不好.数值计算比Sun的VM慢2-3倍.看来没有吹的那么好.
Performance烂,JIT比Sun JRE的non-JIT还要差
avatar
g*g
2
Sun JRE是所谓hotspot,动态JIT

【在 j******o 的大作中提到】
: 不好.数值计算比Sun的VM慢2-3倍.看来没有吹的那么好.
: Performance烂,JIT比Sun JRE的non-JIT还要差

avatar
j*o
3
Sorry I wasn't clear...was trying to say Sun JRE 1.1
running non JIT.
avatar
j*o
4
Sample program:
public class Foo {
public static void main(String [] args) {
double [] a = new double[1000*1000];
double [] b = new double[a.length];
double [] c = new double[a.length];
for (int i = 0; i < c.length; i++) {
a[i]=i;
b[i] = i*i;
}
for(int k=0;k<20;k++){
long t = System.currentTimeMillis();

for (int i = 0; i < c.length; i++) {
c[i] = a[i]*b[i];
}
System.

【在 j******o 的大作中提到】
: Sorry I wasn't clear...was trying to say Sun JRE 1.1
: running non JIT.

avatar
A*o
5
so many printlns, and the time is only 300ms
could you make the program at least run up to a few seconds,
and minimize the i/o impact, and re-test?
Thanks!

【在 j******o 的大作中提到】
: Sample program:
: public class Foo {
: public static void main(String [] args) {
: double [] a = new double[1000*1000];
: double [] b = new double[a.length];
: double [] c = new double[a.length];
: for (int i = 0; i < c.length; i++) {
: a[i]=i;
: b[i] = i*i;
: }

avatar
j*o
6
Sigh..I said it took 20ms for the Sun VM. I don't believe println
makes a difference. For your satisfaction I did an average run and
the results were the same.
300ms is a long time for doing this.

【在 A**o 的大作中提到】
: so many printlns, and the time is only 300ms
: could you make the program at least run up to a few seconds,
: and minimize the i/o impact, and re-test?
: Thanks!

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。