Class Xorshift


  • public class Xorshift
    extends java.lang.Object
    a demo and benchmark of kilim generators used to implement the xorshift PRNG runs xorshift a number of cycles, printing the nanos per cycle and the xor of the result the value is printed just to ensure that the JIT actually runs all the code https://en.wikipedia.org/wiki/Xorshift#xorshift.2B with modes to run the same algorithm as a Generator and as a raw Continuation (the default)
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static interface  Xorshift.Loop  
      static class  Xorshift.X1  
      static class  Xorshift.X2  
    • Constructor Summary

      Constructors 
      Constructor Description
      Xorshift()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static void cycle​(Xorshift.Loop looper, long num)  
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Xorshift

        public Xorshift()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)