[
https://issues.apache.org/jira/browse/MATH-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13102314#comment-13102314
]
Gilles commented on MATH-650:
-----------------------------
Looking at the results included in the file:
{noformat}
Using exp(100); compute=false
new 12155456 9219 5308 5029 5587 5308
5029 5029 5029 5308
Using exp(100); compute=true
new 34929579 9499 5308 5308 5029 5029
5029 5308 5028 5029
Using max(0,0); compute=false
new 5029 3632 3073 3073 3073 3073
3073 3073 3073 3073
Using max(0,0); compute=true
new 5028 3911 3073 3073 3073 3073
3073 3073 3073 3073
{noformat}
IIUC, they seem to agree with mine: By using preset tables, we gain (for
{{exp}}) ~23 milliseconds at the first use.
> 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