You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/de/tilman_neumann/jml/factor/FactorizerTest.java
+24-41Lines changed: 24 additions & 41 deletions
Original file line number
Diff line number
Diff line change
@@ -57,11 +57,11 @@ public class FactorizerTest {
57
57
58
58
// algorithm options
59
59
/** number of test numbers */
60
-
privatestaticfinalintN_COUNT = 100000;
60
+
privatestaticfinalintN_COUNT = 1;
61
61
/** the bit size of N to start with */
62
-
privatestaticfinalintSTART_BITS = 30;
62
+
privatestaticfinalintSTART_BITS = 200;
63
63
/** the increment in bit size from test set to test set */
64
-
privatestaticfinalintINCR_BITS = 1;
64
+
privatestaticfinalintINCR_BITS = 10;
65
65
/** maximum number of bits to test (no maximum if null) */
66
66
privatestaticfinalIntegerMAX_BITS = null;
67
67
/** each algorithm is run REPEATS times for each input in order to reduce GC influence on timings */
@@ -95,7 +95,7 @@ public FactorizerTest() {
95
95
// new Hart_TDiv_Race(),
96
96
// new Hart_TDiv_Race2(),
97
97
// new Hart_Squarefree(false), // best algorithm for semiprime N for 29 to 37 bit
98
-
newHart_Fast2Mult(false), // best algorithm for semiprime N for 38 to 45 bit
98
+
// new Hart_Fast2Mult(false), // best algorithm for semiprime N for 38 to 45 bit
99
99
// new Hart_Fast2Mult_FMA(false),
100
100
101
101
// Lehman
@@ -112,9 +112,9 @@ public FactorizerTest() {
112
112
//new PollardRho31(),
113
113
//new PollardRhoBrent31(),
114
114
// new PollardRhoBrentMontgomeryR64Mul63(),
115
-
newPollardRhoBrentMontgomery64(),
116
-
newPollardRhoBrentMontgomery64_MH(),
117
-
newPollardRhoBrentMontgomery64_MHInlined(),
115
+
// new PollardRhoBrentMontgomery64(),
116
+
// new PollardRhoBrentMontgomery64_MH(),
117
+
// new PollardRhoBrentMontgomery64_MHInlined(),
118
118
119
119
// SquFoF variants
120
120
// * pretty good, but never the best algorithm
@@ -137,54 +137,37 @@ public FactorizerTest() {
137
137
// new CFrac63(true, 5, 1.5F, 0.152F, 0.25F, new TDiv_CF63_02(), 10, new MatrixSolver_Gauss02(), 12),
138
138
139
139
// ECM
140
-
newTinyEcm64(),
141
-
newTinyEcm64_MH(),
142
-
newTinyEcm64_MHInlined(), // best algorithm for N from 46 to 62 bit
140
+
// new TinyEcm64(),
141
+
// new TinyEcm64_MH(),
142
+
// new TinyEcm64_MHInlined(), // best algorithm for N from 46 to 62 bit
143
143
// new EllipticCurveMethod(-1),
144
144
145
145
// SIQS:
146
-
// * best until 220 bit: Sieve03gU + smallPowers + TDiv1L + Gauss
147
-
// * best for 230, 240 bit: Sieve03gU + smallPowers + TDivnL + BL
148
-
// * best for >= 250 bit: (Sieve03gU or SingleBlockHybridSieve) + (noPowers or smallPowers) + (TDiv2L or TDivnL) + BL
149
-
// new SIQS_Small(0.305F, 0.37F, null, new SIQSPolyGenerator(), 10, true),
150
-
146
+
// small N
147
+
// new SIQS_Small(0.32F, 0.37F, null, new SIQSPolyGenerator(), 10, true),
151
148
// new SIQS(0.32F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new SimpleSieve(), new TDiv_QS_1Large(), 10, new MatrixSolver_Gauss02()),
152
149
// new SIQS(0.32F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new Sieve03g(), new TDiv_QS_1Large_UBI(), 10, new MatrixSolver_Gauss02()),
153
150
// new SIQS(0.32F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new Sieve03gU(), new TDiv_QS_1Large(), 10, new MatrixSolver_Gauss02()),
154
151
// new SIQS(0.32F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new Sieve03gU(), new TDiv_QS_1Large_UBI(), 10, new MatrixSolver_Gauss02()),
155
152
156
-
// new SIQS(0.32F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new Sieve03g(), new TDiv_QS_1Large_UBI(), 10, new MatrixSolver_BlockLanczos()),
157
-
// new SIQS(0.32F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new Sieve03g(), new TDiv_QS_2Large_UBI(true), 10, new MatrixSolver_BlockLanczos()),
158
-
// new SIQS(0.32F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new Sieve03g(), new TDiv_QS_nLarge(true), 10, new MatrixSolver_BlockLanczos()),
159
-
// new SIQS(0.32F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new Sieve03g(), new TDiv_QS_nLarge_UBI(true), 10, new MatrixSolver_BlockLanczos()),
160
-
// new SIQS(0.32F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new Sieve03gU(), new TDiv_QS_2Large_UBI(true), 10, new MatrixSolver_BlockLanczos()),
153
+
// large N
154
+
// new SIQS(0.31F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new Sieve03gU(), new TDiv_QS_2Large_UBI(true), 10, new MatrixSolver_BlockLanczos()),
155
+
// new SIQS(0.31F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new Sieve03hU(), new TDiv_QS_2Large_UBI2(true), 10, new MatrixSolver_BlockLanczos()),
156
+
// new SIQS(0.31F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new Sieve03hU(), new TDiv_QS_2Large_UBI2(true), 10, new MatrixSolver_Gauss03()),
161
157
162
158
// sieving with prime powers: best sieve for small N!
163
-
// new SIQS(0.32F, 0.37F, null, new PowerOfSmallPrimesFinder(), new SIQSPolyGenerator(), new Sieve03gU(), new TDiv_QS_1Large_UBI(), 10, new MatrixSolver_Gauss02()),
164
-
// new SIQS(0.32F, 0.37F, null, new PowerOfSmallPrimesFinder(), new SIQSPolyGenerator(), new Sieve03gU(), new TDiv_QS_nLarge_UBI(true), 10, new MatrixSolver_BlockLanczos()),
165
-
// new SIQS(0.32F, 0.37F, null, new AllPowerFinder(), new SIQSPolyGenerator(), new Sieve03gU(), new TDiv_QS_nLarge_UBI(true), 10, new MatrixSolver_BlockLanczos()),
166
-
167
-
// improved SIQS
168
-
// new SIQS(0.32F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new Sieve03gU(), new TDiv_QS_2Large_UBI(true), 10, new MatrixSolver_Gauss02()),
169
-
// new SIQS2(0.31F, 0.37F, null, new NoPowerFinder(), new SIQSPolyGenerator(), new Sieve03hU(), new TDiv_QS_2Large_UBI2(true), 10, new MatrixSolver_Gauss02()),
159
+
// new SIQS(0.31F, 0.37F, null, new PowerOfSmallPrimesFinder(), new SIQSPolyGenerator(), new Sieve03hU(), new TDiv_QS_2Large_UBI2(true), 10, new MatrixSolver_Gauss03()),
160
+
// new SIQS(0.31F, 0.37F, null, new AllPowerFinder(), new SIQSPolyGenerator(), new Sieve03hU(), new TDiv_QS_2Large_UBI2(true), 10, new MatrixSolver_Gauss03()),
170
161
171
162
// Multi-threaded SIQS:
172
-
// * 4/6 threads takes over at N around 100 bit (more exact estimates: 4 threads best for N>=88 bits, 6 threads for N>=112 bits)
173
-
// * we need 0.14 < smoothBoundExponent < 0.2; everything else is prohibitive; use null for dynamic determination
174
-
// * BlockLanczos is better than Gauss solver for N > 200 bit
175
-
// new PSIQS(0.32F, 0.37F, null, 6, new NoPowerFinder(), new MatrixSolver_BlockLanczos()),
176
-
// new PSIQS_U(0.32F, 0.37F, null, 20, new NoPowerFinder(), new MatrixSolver_PGauss01(10)),
177
-
// new PSIQS_U(0.32F, 0.37F, null, 20, new NoPowerFinder(), new MatrixSolver_BlockLanczos()),
178
-
// new PSIQS_U(0.32F, 0.37F, null, 6, new PowerOfSmallPrimesFinder(), new MatrixSolver_BlockLanczos()),
179
-
// new PSIQS_U(0.32F, 0.37F, null, 6, new AllPowerFinder(), new MatrixSolver_BlockLanczos()),
180
-
181
-
// new PSIQS_U(0.32F, 0.37F, null, 20, new NoPowerFinder(), new MatrixSolver_BlockLanczos()),
182
-
183
-
// (0.31, 0.37) and (0.31, 0.365) are way better than (0.32, 0.37) for PSIQS_U2 !!
184
-
// new PSIQS_U2(0.31F, 0.37F, null, 20, new NoPowerFinder(), new MatrixSolver_BlockLanczos()),
163
+
// new PSIQS(0.32F, 0.37F, null, 16, new NoPowerFinder(), new MatrixSolver_BlockLanczos()),
0 commit comments