ppkarwasz commented on PR #1379:
URL: https://github.com/apache/commons-lang/pull/1379#issuecomment-2887585781

   > Where are we on this one? @ppkarwasz do you still plan on providing an 
alternative solution?
   
   This pull request appears to be nearly ready. It includes the following 
changes:
   
   - Sets the maximum size of the internal `CachedRandomBits` class to 
`Integer.MAX_VALUE / 8`.
   - Limits the maximum requested size for `CachedRandomBits` to approximately 
`Integer.MAX_VALUE / 5`.
   
   I could switch the `bitIndex` field to `long`, which would allow increasing 
the maximum size of `CachedRandomBits` up to `Integer.MAX_VALUE`. However, it's 
unclear whether this would provide any practical benefit. A benchmark would 
likely show that caching such a large number of random bits offers no 
significant performance advantage.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to