commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Maisonobe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-579) FastMath.pow much slower than Math.pow
Date Wed, 18 May 2011 17:22:47 GMT

    [ https://issues.apache.org/jira/browse/MATH-579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035501#comment-13035501
] 

Luc Maisonobe commented on MATH-579:
------------------------------------

{quote}
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...
{quote}

I think mainly about hosted application, in environments like Eclipse, web servers, service
oriented architectures, perhaps even Android devices. The JVM is already started but I'm not
sure the class are reused between requests, I think a new fresh context is set up with a new
classloader, which involves reloading the class.

For sure, micro-benchmark should be avoided. Despite it is quite old, the paper about flawed
micro benchmark by Brian Goetz [http://www.ibm.com/developerworks/java/library/j-jtp02225/index.html]
is really enlightening.

If we get further reports about this latency, we may look at a way to pre-compute the tables
at compile time rather than at runtime to see if we can save some milliseconds.

> FastMath.pow much slower than Math.pow
> --------------------------------------
>
>                 Key: MATH-579
>                 URL: https://issues.apache.org/jira/browse/MATH-579
>             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()
function.
> Ether this is a bug or a javadoc comment is missing.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message