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 20
20
21
21
import de .tilman_neumann .jml .factor .FactorAlgorithm ;
22
22
import de .tilman_neumann .jml .gcd .Gcd31 ;
23
- import de .tilman_neumann .jml .random .SpRand32 ;
23
+ import de .tilman_neumann .jml .random .Xorshf32 ;
24
24
import de .tilman_neumann .util .Ensure ;
25
25
26
26
/**
@@ -47,7 +47,7 @@ public class PollardRhoBrentMontgomery32 extends FactorAlgorithm {
47
47
private static final Logger LOG = LogManager .getLogger (PollardRhoBrentMontgomery32 .class );
48
48
private static final boolean DEBUG = false ;
49
49
50
- private static final SpRand32 RNG = new SpRand32 ();
50
+ private static final Xorshf32 RNG = new Xorshf32 (); // looks slightly faster than SpRand32 here
51
51
52
52
// The reducer R is 2^32, but the only constant still required is the half of it.
53
53
private static final int R_HALF = 1 << 31 ;
Original file line number Diff line number Diff line change 18
18
/**
19
19
* <strong>Experimental</strong> 64 bit random number generator computing longs from three consecutive 32 bit random numbers.
20
20
*
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
+ *
21
24
* @author Tilman Neumann
22
25
*/
23
26
public class Xorshf64 {
You can’t perform that action at this time.
0 commit comments