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

Calculate isNan and isFinite in Complex constructor

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0
    • 2.0
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: