[
https://issues.apache.org/jira/browse/MATH-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13104591#comment-13104591
]
Gilles commented on MATH-650:
-----------------------------
With "false" you get ~5 ms, a lower time than me (running on a supposedly
"high-end" device aka a desktop PC): ~20 ms.
With "true" you get a higher time than me: ~70 ms.
I simply don't understand.
Please note that I've also posted a message on the "dev" ML, summarizing the
issues related to this report. In particular, I'm interested in what
constitutes a realistic use-case.
Timing a single call to "pow" or "floor" helped detect the source of the
problem, but is hardly representative of a useful application... I would need
to have an idea of the actual running time of your application in order to be
convinced that the preset table are a necessary workaround.
In other words, would you have filed this report if you initially got the above
182 ms instead of the reported 4 to 5 seconds?
> FastMath has static code which slows the first access to FastMath
> -----------------------------------------------------------------
>
> Key: MATH-650
> URL: https://issues.apache.org/jira/browse/MATH-650
> Project: Commons Math
> Issue Type: Improvement
> Affects Versions: Nightly Builds
> Environment: Android 2.3 (Dalvik VM with JIT)
> Reporter: Alexis Robert
> Priority: Minor
> Attachments: FastMathLoadCheck.java
>
>
> Working on an Android application using Orekit, I've discovered that a simple
> FastMath.floor() takes about 4 to 5 secs on a 1GHz Nexus One phone (only the
> first time it's called). I've launched the Android profiling tool (traceview)
> and the problem seems to be linked with the static portion of FastMath code
> named "// Initialize tables"
> The timing resulted in :
> - FastMath.slowexp (40.8%)
> - FastMath.expint (39.2%)
> \- FastMath.quadmult() (95.6% of expint)
> - FastMath.slowlog (18.2%)
> Hoping that would help
> Thanks!
> Alexis Robert
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira