Hi, On Fri, Feb 22, 2008 at 6:35 AM, Martin Jansche <[EMAIL PROTECTED]> wrote: > What JVM do you use? IIRC, the math routines improved quite a bit in > speed in 1.5 and 1.6.
I'm using 1.6, and you're right, I remember that 1.4 was slower. > (as of JDK 1.3, I believe). You might want to try to run your > benchmark with StrictMath instead of Math. Well that's funny. I did just that and here are the results: Running ch.visnet.jgsl.sf.TestLog JGSL computes 2000000 logarithms in 375 ms. Java computes 2000000 logarithms in 452 ms. JGSL computes 2000000 absolute logarithms in 331 ms. Java computes 2000000 absolute logarithms in 396 ms. JGSL computes 2000000 log(1+x) in 620 ms. Java computes 2000000 log(1+x) in 488 ms. Java is still slightly faster for log(1+x) but definitely slower for normal logs. An earlier poster (Daniel) mentioned that a JIT compiler might replace Math.log() with direct call to the C routine, which this benchmark seems to confirm. Are there any references I could consult about the relative merits of GSL in terms of speed and precision compared with the standard C routine? I'd like to document all this before I release this snapshot. Kind regards, David _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
