commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (JIRA)" <>
Subject [jira] [Commented] (MATH-579) FastMath.pow much slower than Math.pow
Date Wed, 18 May 2011 16:03:47 GMT


Gilles commented on MATH-579:

In answer to your question, Gilles, there are some applications where 100ms is a big deal
and if they just make one or two calls [...]

This does not answer my question, which could be restated as: How can 100 ms matter when the
JVM can take several seconds to start up?
I'm curious of what real applications (that use CM) would run for less than a few seconds...

If we get a lot of feedback from users indicating that this latency is a material practical
problem for them, or prevents them using the library, we may want to consider making the embedded
use configurable.

I surely hope that micro-benchmarks are not going to be taken into consideration...

I am thankful to Arne for having pointed it out [...]

At the time "FastMath" was introduced, I had already pointed out the relative slowness of
some functions, to which it had been answered that the "fast" in "FastMath" would kick in
only when doing several millions calls (i.e. after the JIT compiler would compile the methods
to native code).

I am thankful to [...] Luc for improving the documentation.


> FastMath.pow much slower than Math.pow
> --------------------------------------
>                 Key: MATH-579
>                 URL:
>             Project: Commons Math
>          Issue Type: Bug
>    Affects Versions: 3.0
>         Environment: java version "1.6.0_22"
> OpenJDK Runtime Environment (IcedTea6 1.10.1) (6b22-1.10.1-0ubuntu1)
> OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
> java version "1.6.0_24"
> Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
> Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
>            Reporter: Arne Plöse
>             Fix For: 3.0
> calculating FastMath.pow(10, 0.1 / 20) is approximately 65 times slower as the Math.pow()
> Ether this is a bug or a javadoc comment is missing.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message