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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 15
    • 9, 10
    • hotspot
    • b10

      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.

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

              Created:
              Updated:
              Resolved: