Reduce memory consumption of BigInteger.pow()

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 25
    • Affects Version/s: None
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: