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

Don't use indy for optimistic arithmetic

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • core-libs
    • None
    • b105
    • generic
    • generic

      We currently use indy for linking optimistic arithmetic operations. This is somewhat wasteful, as we'll have to use INVOKEDYNAMIC (5 bytecodes) + a CP entry, as well as go through a bootstrap method and create a ConstantCallSite. This can be replaced with an INVOKESTATIC (3 bytecodes). It will add explicit loading of program point through either ICONST, BIPUSH, SIPUSH, or LDC, adding between 1-3 bytes to the instruction, so the call site length in the bytecode will be between 4-6 bytes instead of the fix 5, but I expect there will overall be both bytecode size, runtime size, and execution time savings as we will not need all of the extra stuff (call site object, bootstrap invocation, bootstrap descriptor in CP)

            attila Attila Szegedi
            attila Attila Szegedi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: