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

LXM family of random number generators

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Implemented
    • 1.4
    • 1.5
    • core, simple
    • None

    Description

      JDK 17 updates the random number support and adds a LXM family of random number generators. The generators are described in the following paper:

      Steele and Vigna (2021)
      LXM: better splittable pseudorandom number generators (and almost as fast). 
      Proceedings of the ACM on Programming Languages, Volume 5, Article 148, pp 1–31
      

      https://doi.org/10.1145/3485525

      The generators mix the output of a linear conguential generator (LCG; L) and a Xor-based generator (XBG; X). The paper provides code examples for L64X128MixRandom and L128X256MixRandom from JDK 17.

      Details of the combinations of the linear conguential generator (LCG; L) and Xor-based generators (XBG; X) used in JDK 17 are provided in the package javadoc:
      JDK 17 java.util.random

      The current commons RNG library implements all the XBG generators. Adding support for these generators should add a LCG to combine with the output of the XBG via the specified mix function.

      All constants are supplied in the JDK 17 package javadoc to allow implementation with the exception of the mixing functions lea32 and lea64. The lea64 function is provided in the paper above but the reference origin is personal communication with Doug Lea (2013). Thus the lea32 mix function for 32-bit generators is not published. Obtaining from the JDK source code is possible but would be subject to the Java licence.

      The generators support jump functionality and are suitable for streaming in large numbers for parallel applications (the paper tests up to 2^24 generators) by using a different additive constant for the LCG for each generator to ensure no sequence overlap. Creating a new additive constant is significantly faster than performing a jump operation.

      Attachments

        1. lcg128carry.jpg
          196 kB
          Alex Herbert

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h