# Can we avoid to fall back to very slow toy implementation in the computation of Groebner basis under a finite field of large characteristic?

I made a computation involving the computation of a Groebner basis under a finite field of large characteristic $p$.

If $p<2^{31}$ then everything is ok:

sage: %time function(previous_prime(2^31))
CPU times: user 875 ms, sys: 31 ms, total: 906 ms
Wall time: 1.14 s
[1]


But if $p>2^{31}$ then the computation became very slow:

sage: %time function(next_prime(2^31))
verbose 0 (3837: multi_polynomial_ideal.py, groebner_basis) Warning: falling back to very slow toy implementation.
# 6 times above message
CPU times: user 36min 28s, sys: 9.23 s, total: 36min 38s
Wall time: 37min 27s
[1]


I guess that it has something to do with 32-bits computer integers. The point is that my computer is 64-bits.

Question: Is there a way to avoid this slow-down (at least for $p<2^{63}$)?

edit retag close merge delete