j*o
3 楼
Sorry I wasn't clear...was trying to say Sun JRE 1.1
running non JIT.
running non JIT.
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.
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.
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;
: }
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;
: }
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!
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!
相关阅读
急急急, 怎么实现reload pageRe: EIOffice (永中) got good revA questionhelp about javascript new window(post)为何运行JAVA出现这个错误?[转载] 有java applet 程序的主页,如何抓到本地?How to write subset method?如何使jcombobox的item居中显示?在JBOSS-3.2+Tomcat-4.1中怎么配置端口号?is there anyway that i can return...有没有怎么配置jbuilder+jboss+tomcat的资料JBuilder questionhow to transfer data between two socketshelp!!Sun公司最近有啥突飞猛进不?[转载] 问一个关于速度的问题请问现在最常用的开放SSL平台是什么能这么 create thread 吗?Java Server FacesI can access Re: java.sun.com down?