.hgtags

Wed, 10 Aug 2016 15:46:08 +0800

author
fujie
date
Wed, 10 Aug 2016 15:46:08 +0800
changeset 57
a604f59fea28
parent 24
d2be62fdfa50
child 412
afd17487af23
permissions
-rw-r--r--

Performance of long integer division is 100% up.

public class Test {

public static void main(String[] args) {
long LEN = 650000000;
long result = 0;

for(long j = 1; j < 20; j++) {
result = 0;
for(long i = 1; i < LEN; i++){
result += i / (j + 1);
}
}

System.out.println("result = " + result);
}
}

     1 f90c822e73f8f30ebfc930bdffc6263a99aec49f jdk8u25-b17
     2 2d8a650513c2c3e6717fcbfe5d4f12abee5ff96b mips64-jdk8u25-b17-rc1
     3 afa196fe1bf669c34fe9acb7ebb31aabc8f0437a mips64-jdk8u25-b17-rc2

mercurial