Made random generation of BigIntegers faster
Fabio Romano
fabio19298 at gmail.com
Mon Feb 27 17:24:56 UTC 2023
This enhancement makes the generation of random BigIntegers faster, using
directly a random generated int[] magnitude array instead of a byte[]
array. This permits to call trustedStripLeadingZeroInts() instead of
stripLeadingZeroBytes(), in order to avoid copying the contents of the
byte[] array in an int[] array if not necessary, since, unlike the previous
implementation, the int[] array is not used as an argument by the method of
the Random object used to generate random ints.
Link to Pull request: https://github.com/openjdk/jdk/pull/12775
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/core-libs-dev/attachments/20230227/a964659f/attachment.htm>
More information about the core-libs-dev
mailing list