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

Reduce memory consumption of BigInteger.pow()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • core-libs
    • b23

      Reduce memory consumption of BigInteger.pow() by adopting a better computation strategy.
      By iterating the exponent bits from left to right (from most to least significant), only the current running result needs to be squared and multiplied, while the base is untouched.
      The memory savings are substantial, up to 45% w.r.t. the current implementation.

            rgiulietti Raffaello Giulietti
            rgiulietti Raffaello Giulietti
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: