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

Calculate isNan and isFinite in Complex constructor

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Labels:
      None

      Description

      From profiling some code performing a large number of FFT operations I found that due to isNaN being called as part of complex arithmetic a large proportion of time was spent within isNaN.

      I would propose calculating isNaN and isFinite in the constructor to save calculating these values each time the methods are called.

        Attachments

        1. Complex.patch
          1 kB
          Mark Anderson

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mark@panonet.net Mark Anderson
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: