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/test/java/de/tilman_neumann/jml/factor/FactorizerTest.java
+8-2Lines changed: 8 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,12 @@
49
49
/**
50
50
* Main class to compare the performance of factor algorithms.
51
51
*
52
-
* Does one warmup-round and a System.gc() before each algorithm is tested.
52
+
* Unfortunately, the timing results produced by this class may be quite inaccurate.
53
+
*
54
+
* The main problem is that the Hotspot compiler optimizes the code from the first several thousand tests.
55
+
* If you run tests from 50 to 100 bits, the code will be optimized for the 50 bit numbers and the results for 100 bit numbers will be quite inaccurate.
56
+
*
57
+
* I should be use scripts that restart the JVM for every new bitsize...
53
58
*
54
59
* @author Tilman Neumann
55
60
*/
@@ -377,7 +382,8 @@ public static void main(String[] args) {
377
382
// test N with the given number of bits, i.e. 2^(bits-1) <= N <= (2^bits)-1
378
383
testEngine.testRange(bits);
379
384
bits += INCR_BITS;
380
-
if (MAX_BITS!=null && bits > MAX_BITS) break;
385
+
// permit the generator to run from bigger to smaller test numbers, too
0 commit comments