@@ -633,25 +633,33 @@ int main(int argc, char **argv)
633
633
"\"Faster radix conversion (writing)\"" , & MP_RADIX_WRITE_CUTOFF ,
634
634
& (updated .RADIX_WRITE ),MP_HAS (S_MP_FASTER_TO_RADIX ) ? s_time_radix_conversion_write : NULL
635
635
}
636
+
636
637
#undef T_MUL_SQR
637
638
};
638
639
/* Turn all limits from bncore.c to the max */
639
640
set_cutoffs (& max_cutoffs );
641
+
640
642
for (n = 0 ; n < (sizeof (test )/sizeof (test [0 ]) - 2 ); ++ n ) {
641
643
if (test [n ].fn != NULL ) {
642
644
s_run (test [n ].name , test [n ].fn , test [n ].cutoff );
643
645
* test [n ].update = * test [n ].cutoff ;
644
646
* test [n ].cutoff = INT_MAX ;
645
647
};
646
648
}
647
- /* Cutoffs for radix conversions are in bits to make handling of 62 different radices
648
- more feasible. */
649
+
650
+ /* We need the updated fast multiplication cutoffs for the radix conversion, set them */
651
+ for (n = 0 ; n < (sizeof (test )/sizeof (test [0 ]) - 2 ); ++ n ) {
652
+ if (test [n ].fn != NULL ) {
653
+ * test [n ].cutoff = * test [n ].update ;
654
+ };
655
+ }
656
+
657
+ /* Cutoffs for radix conversions are in bits to make handling of 62 different radices easier */
649
658
for (; n < sizeof (test )/sizeof (test [0 ]); ++ n ) {
650
659
if (test [n ].fn != NULL ) {
651
660
s_run (test [n ].name , test [n ].fn , test [n ].cutoff );
652
661
/* TODO: can overflow for small INT_MAX */
653
662
* test [n ].update = ((* test [n ].cutoff ) * MP_DIGIT_BIT * 93 )/28 ;
654
- * test [n ].cutoff = INT_MAX ;
655
663
}
656
664
}
657
665
}
0 commit comments