From f40b8423b6dab9ed947268b6976dccb4030720ed Mon Sep 17 00:00:00 2001
From: Paul Zimmermann
Date: Tue, 10 Jul 2018 11:11:35 +0200
Subject: [PATCH] [dlpolyselect] don't check if g is irreducible
This test is too expensive and never happens for large N.
---
polyselect/dlpolyselect.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/polyselect/dlpolyselect.c b/polyselect/dlpolyselect.c
index a899830..f3d9ae4 100644
--- a/polyselect/dlpolyselect.c
+++ b/polyselect/dlpolyselect.c
@@ -628,10 +628,14 @@ polygen_JL2 (mpz_t n, unsigned long k,
for (u->deg = dg; u->deg >= 0 && mpz_cmp_ui (u->coeff[u->deg], 0)
== 0; u->deg--);
- /* if u is not square-free or irreducible, skip it */
+#if 0
+ /* If u is not square-free or irreducible, skip it. However, this
+ test is very expensive, and non-irreducible polynomials should
+ not happen in practice for large input N, thus we disable. */
if (mpz_cmp_ui (u->coeff[0], 0) == 0 || !mpz_poly_squarefree_p (u)
|| !mpz_poly_is_irreducible_z (u))
continue;
+#endif
if (print_nonlinear_poly_info (f, alpha_f, u, format, n))
{
--
2.1.4