The fmpz_poly_factor benchmark spends something like 15% of the time in fmpz_lll_is_reduced_mpfr_with_removal which does MPFR arithmetic with a precision of 120 bits. For some polynomials this accounts for half the running time. An easy speedup here should be to use a 128-bit floating-point type optimised for speed.
Actually, it's possible that we mostly enter this code due to running out of exponent range for the d variant rather than running out of precision, in which case a 64-bit float type with 64-bit exponent would be enough.
The
fmpz_poly_factor
benchmark spends something like 15% of the time infmpz_lll_is_reduced_mpfr_with_removal
which does MPFR arithmetic with a precision of 120 bits. For some polynomials this accounts for half the running time. An easy speedup here should be to use a 128-bit floating-point type optimised for speed.Actually, it's possible that we mostly enter this code due to running out of exponent range for the
d
variant rather than running out of precision, in which case a 64-bit float type with 64-bit exponent would be enough.