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.
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}$)?