File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/main/java/de/tilman_neumann/jml Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 2020
2121import de .tilman_neumann .jml .factor .FactorAlgorithm ;
2222import de .tilman_neumann .jml .gcd .Gcd31 ;
23- import de .tilman_neumann .jml .random .SpRand32 ;
23+ import de .tilman_neumann .jml .random .Xorshf32 ;
2424import de .tilman_neumann .util .Ensure ;
2525
2626/**
@@ -47,7 +47,7 @@ public class PollardRhoBrentMontgomery32 extends FactorAlgorithm {
4747 private static final Logger LOG = LogManager .getLogger (PollardRhoBrentMontgomery32 .class );
4848 private static final boolean DEBUG = false ;
4949
50- private static final SpRand32 RNG = new SpRand32 ();
50+ private static final Xorshf32 RNG = new Xorshf32 (); // looks slightly faster than SpRand32 here
5151
5252 // The reducer R is 2^32, but the only constant still required is the half of it.
5353 private static final int R_HALF = 1 << 31 ;
Original file line number Diff line number Diff line change 1818/**
1919 * <strong>Experimental</strong> 64 bit random number generator computing longs from three consecutive 32 bit random numbers.
2020 *
21+ * It is fast, but the quality of the generated numbers seems to be insufficient to improve the performance of
22+ * factoring algorithms like PollardRhoBrentMontgomery64.
23+ *
2124 * @author Tilman Neumann
2225 */
2326public class Xorshf64 {
You can’t perform that action at this time.
0 commit comments