@@ -79,11 +79,11 @@ private enum TestMode {
79
79
/** number of test numbers */
80
80
private static final int N_COUNT = 100000 ;
81
81
/** the bit size of N to start with */
82
- private static final int START_BITS = 45 ;
82
+ private static final int START_BITS = 20 ;
83
83
/** the increment in bit size from test set to test set */
84
84
private static final int INCR_BITS = 5 ;
85
85
/** maximum number of bits to test (no maximum if null) */
86
- private static final Integer MAX_BITS = 45 ;
86
+ private static final Integer MAX_BITS = 20 ;
87
87
/** each algorithm is run REPEATS times for each input in order to reduce GC influence on timings */
88
88
private static final int REPEATS = 5 ;
89
89
/** number of warmup rounds */
@@ -105,32 +105,27 @@ public FactorizerTest() {
105
105
algorithms = new FactorAlgorithm [] {
106
106
107
107
// Trial division
108
- // new TDiv31(),
108
+ new TDiv31 (),
109
109
new TDiv31Inverse (),
110
110
new TDiv31Barrett (), // Fastest algorithm for N < 29 bit
111
- // new TDiv63(),
111
+ new TDiv63 (),
112
112
new TDiv63Inverse (1 <<21 ),
113
- // new TDiv().setTestLimit(1<<20 ),
113
+ // new TDiv().setTestLimit(1<<21 ),
114
114
115
115
// Hart's one line factorizer
116
116
//new HartSimple(),
117
- // new HartFast(false),
118
- // new HartFast(true),
119
- // new HartTDivRace(),
120
- // new HartTDivRace2(),
121
- // new HartSquarefree(false), // best algorithm for semiprime N for 29 to 37 bit
122
- // new HartFast2Mult(false), // best algorithm for semiprime N for 38 to 45 bit
123
- // new HartFast2MultFMA(false),
124
- // new HartMultiplierChainSqrtN(false),
117
+ new HartFast (true ),
118
+ new HartTDivRace (),
119
+ new HartTDivRace2 (),
120
+ new HartSquarefree (true ), // best algorithm for semiprime N for 29 to 37 bit
125
121
new HartFast2Mult (true ), // best algorithm for semiprime N for 38 to 45 bit
126
122
new HartFast2MultFMA (true ),
127
123
new HartFast2Mult2 (true ), // best algorithm for semiprime N for 38 to 45 bit
128
124
129
125
// Lehman
130
126
//new LehmanSimple(false),
131
127
//new LehmanSmith(false),
132
- // new LehmanFast(false), // the variant implemented by bsquared
133
- //new LehmanFast(true),
128
+ new LehmanFast (true ), // the variant implemented by bsquared
134
129
new LehmanCustomKOrder (true ),
135
130
136
131
// PollardRho
@@ -139,7 +134,7 @@ public FactorizerTest() {
139
134
// new PollardRhoTwoLoops31(),
140
135
new PollardRhoBrentMontgomery32 (),
141
136
142
- // new PollardRhoBrentMontgomery64(),
137
+ new PollardRhoBrentMontgomery64 (),
143
138
new PollardRhoBrentMontgomery64MH (),
144
139
new PollardRhoBrentMontgomery64MHInlined (),
145
140
@@ -155,10 +150,10 @@ public FactorizerTest() {
155
150
// * SquFoF31 works until 52 bit and is faster there than SquFoF63
156
151
// * best multiplier sequence = 1680 * {squarefree sequence}
157
152
// * best stopping criterion = O(5.th root(N))
158
- new SquFoF63 (),
159
153
//new SquFoF31(),
160
154
new SquFoF31Preload (),
161
-
155
+ new SquFoF63 (),
156
+
162
157
// CFrac
163
158
// * never the best algorithm: SquFoF63 is better for N <= 65 bit, SIQS is better for N >= 55 bits
164
159
// * stopRoot, stopMult: if big enough, then a second k is rarely needed; (5, 1.5) is good
@@ -171,7 +166,7 @@ public FactorizerTest() {
171
166
// new CFrac63(true, 5, 1.5F, 0.152F, 0.25F, new TDiv_CF63_02(), new MatrixSolverGauss02(), 12),
172
167
173
168
// ECM
174
- // new TinyEcm64(true),
169
+ new TinyEcm64 (true ),
175
170
new TinyEcm64MH (true ),
176
171
new TinyEcm64MHInlined (true ), // best algorithm for N from 46 to 62 bit
177
172
// new EllipticCurveMethod(-1),
0 commit comments