Math performance in JDK 1.5 (or 5.0)

L

little

Hi

Did anybody notice a loss of performance in math libraries on JDK
1.5. Here a simple test program :

long start = System.currentTimeMillis();
int COUNT_SIMUL = 1000000;
double sum = 0.;
for (int idx= 0; idx < COUNT_SIMUL; idx++)
{
sum += Math.exp(Math.log(idx + 1) - 1);
}
long end = System.currentTimeMillis();

I tried it on my PIV 2.8 Ghz /HT and here are the results :

JDK 1.4 Client : 0.64 sec
JDK 1.4 Server : 0.58 sec

JDK 1.5 Client : 0.67 sec
JDK 1.5 Server : 1.01 sec

In many tests, I have the same kind of gap. Is there a reason for
this and a way to avoid it ? This is a serious problem for an
application I develop which use a lot of this functions.

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top