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

Performance tuning of sun.misc.FloatingDecimal/FormattedFloatingDecimal

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P3
    • 8
    • 7
    • core-libs
    • None
    • b96
    • generic
    • generic
    • Verified

    Description

      Current FloatingDecimal implementation contains serious scalability issue ("static synchronized" method), that was fixed. A lot of other improvement also were done.

      I have to note that I do not change existing algorithm, I only tuned existing.

      Performance result:

      1. double -> String
      I've separated 3 paths here: using long conversion, "fast path iterative" and "slow path iterative" (slow path uses big arithmetic). Paths have different performance (for example long conversion is 20x times faster than "slow path iterative"), that is why I measured results separately for each path.

      - long conversion - +40% boost on SPARC (+30% in x86)
      - "fast path iterative" - +10%
      - "slow path iterative" (single threaded) - +80%
      - "slow path iterative" (multi threaded) - up to 6.5x times faster (on SPARC with 64 hw threads) due to solving scalability problem.

      2. Decimal string -> double

      - "fast path" - +10%
      - "slow path" (single threaded) - +60% on SPARC (+50% on x86)
      - "slow path" (multi threaded) - up to 20x times faster (on SPARC with 64 hw threads) due to solving scalability problem.

      3. Hex string -> double

      - "fast path" (single threaded) - 3x times faster
      - "fast path" (multi threaded) - up to 15x times (scalability)
      - "slow path" (single threaded) - 5x times
      - "slow path" (multi threaded) - up to 27x times (scalability)

      4. Modification java.text.DigitList.
       (avoid reparsing string obtained from double into digits and exponent) - +15%-%30 (to performance of NumberFormat for double)

      Attachments

        Issue Links

          Activity

            People

              bpb Brian Burkhalter
              skuksenko Sergey Kuksenko
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: