commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MATH-650) FastMath has static code which slows the first access to FastMath
Date Sat, 08 Oct 2011 02:03:29 GMT

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

Gilles commented on MATH-650:
-----------------------------

{{FastMathLoadCheck}} (revision 1180294):

{noformat}
Using exp(100); how=compute
    times       result
 42677576 2.688117e+43
     5338 2.688117e+43
     1831 2.688117e+43
     1759 2.688117e+43

Using exp(100); how=resources
    times       result
 12930977 2.688117e+43
     4650 2.688117e+43
     2322 2.688117e+43
     2496 2.688117e+43

Using exp(100); how=array
    times       result
 12281292 2.688117e+43
     4824 2.688117e+43
     1807 2.688117e+43
     1877 2.688117e+43

Using max(0,0); how=compute
    times       result
     3293 0.000000e+00
     1110 0.000000e+00
      375 0.000000e+00
      376 0.000000e+00

Using max(0,0); how=resources
    times       result
     2680 0.000000e+00
      713 0.000000e+00
      382 0.000000e+00
      367 0.000000e+00

Using max(0,0); how=array
    times       result
     3065 0.000000e+00
      520 0.000000e+00
      370 0.000000e+00
      376 0.000000e+00
{noformat}
                
> 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, LucTestPerformance.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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message