aherbert commented on PR #191: URL: https://github.com/apache/commons-rng/pull/191#issuecomment-3872734538
I've had a bit more time to review this in comparison to the other jumpable RNGs. The smallest jump supported by others is 2^64. The jumps are all documents in the same way. So you can get an idea of the jump size using: ``` git grep -A 2 'The jump size is the equivalent of' ``` I think the Philox 32-bit generator can be updated to jump 4*2^64 and 4*2^96. This would make the jumps similar to those provided by the AbstractXoShiRo128 generators: XoShiRo128Plus, XoShiRo128PlusPlus, XoShiRo128StarStar. This size of jump is much easier to implement. The small jump increments counter2 and overflows to counter3; the long jump increments counter3. A similar change in the 64-bit generator would have jumps of 4*2^128 and 4*2^196. The purpose of long jumping is to move far enough ahead to be able to create a stream of jumpable generators, where each jumpable generator can stream effectively unlimited RNGs which will not overlap within reason. A jump size of 4*2^32 creates a generator that could overlap with the next one in a long running use of RNG output. The next size up of 4*2^64 for each output would require significantly more time to overlap its sequence. If you can copy the javadoc wording from the other generators to state the jump size and expected output length of each child generator that would be helpful. As for configurable jumping I believe we require some interface similar to the JDK's: [RandomGenerator.ArbitrarilyJumpableGenerator](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/random/RandomGenerator.ArbitrarilyJumpableGenerator.html). This functionality can be added after the main Philox generator implementation is merged. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
