Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-650

FastMath has static code which slows the first access to FastMath

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.0
    • None
    • None
    • Android 2.3 (Dalvik VM with JIT)

    Description

      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

      Attachments

        1. LucTestPerformance.java
          7 kB
          Gilles Sadowski
        2. FastMathLoadCheck.java
          2 kB
          Sebb

        Activity

          People

            Unassigned Unassigned
            ale6 Alexis Robert
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: