Uploaded image for project: 'Commons RNG'
  1. Commons RNG
  2. RNG-127

Assess future compatibility with JEP 356: Enhanced Pseudo-Random Number Generators

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.3
    • None
    • client-api
    • None

    Description

      JEP 356 specifies an enhancement to the random number generators. This is targeted to JDK 17.

      JEP 356: Enhanced Pseudo-Random Number Generators

      The enhancement will add interfaces to the JDK for random number generation:

      • SplittableRandomGenerator extends RandomGenerator and also provides
        methods named split and splits. Splittability allows the user to spawn a new RandomGenerator from an existing RandomGenerator that will generally produce statistically independent results.
      • JumpableRandomGenerator extends RandomGenerator and also provides
        methods named jump and jumps. Jumpability allows a user to jump ahead a moderate number of draws.
      • LeapableRandomGenerator extends RandomGenerator and also provides
        methods named leap and leaps. Leapability allows a user to jump ahead a large number of draws.
      • ArbitrarilyJumpableRandomGenerator extends LeapableRandomGenerator and also provides additional variations of jump and jumps that allow an arbitrary jump distance to be specified.

      The specification describes the development of abstract classes that would allow different algorithms to be easily implemented by developers and used with a Java application through a common interface. This would replicate the functionality of the Common RNG API and core modules within the JDK.

      The JDK interfaces should be compared with the current client API in Commons RNG with the aim to assess:

      1. Compatibility
      2. Potential to back-port functionality

      JEP 356 also mentions the implementation of the LXM family of RNGs and a change to the algorithm used by SplittableRandom to address two weaknesses identified in 2016. These could be included in the current codebase pending license compatibility checks.

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aherbert Alex Herbert
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: