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

Creation of random BigIntegers can be made faster

XMLWordPrintable

    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      JDK 21

      A DESCRIPTION OF THE PROBLEM :
      The algorithm used to generate random BigIntegers creates a byte array randomly filled by a specified Random object, then the byte array is copied into the int magnitude array, stripping any leading zero ints. This procedure can be made faster, creating directly the int magnitude array and ensuring that there are no leading zero ints, like I did here: https://github.com/openjdk/jdk/pull/16817


            bpb Brian Burkhalter
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: