Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8136414

Large performance penalty declaring a method strictfp on strict-only platforms

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9, 10
    • Fix Version/s: 15
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b10

      Description

      Java has two kinds of floating-point environments:

      * FP-strict (methods declared strictfp, etc.) where floating-point operational semantics are fully specified

      * non FP-strict (the default) where some variation is allowed in the exponent range of expressions, but not in fields.

      The non-strict environment accommodates certain peculiarities of performing 32-bit float and 64-bit double calculations on the 80-bit registers of the x87 stack. However, on many hardware processors strictfp is a no-op since all the floating-point operations run strictly. These contexts where strictfp is a no-op would include x86 SSE2 and later instruction set extensions.

      When there is no difference in code generated between strictfp and non-strictfp contexts, there should not be a large performance penalty to declaring code strictfp.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vlivanov Vladimir Ivanov
              Reporter:
              darcy Joe Darcy
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: