Re: p=randomprime(2^2000) is significantly slower than isprime(p)
Georgi Guninski <[email protected]> Sun, 12 May 2024 12:44:58 +0300
| Newsgroups | gmane.comp.mathematics.pari.devel |
|---|---|
| Message-ID | <CAGUWgD868__S5WXXZMXUNi85V_BAxBp1eWGmJsXhM9zTm68oNQ@mail.gmail.com> |
Oooops, I made a critical language error, sorry. isprime(p) is slower than randomprime(p): ? default(timer,1) ? setrand(1) ? p=randomprime(2^2000) time = 747 ms. ? isprime(p) time = 14,758 ms. %4 = 1 ? ispseudoprime(p) time = 40 ms. %5 = 1 On Sun, May 12, 2024 at 12:38 PM Georgi Guninski <[email protected]> wrote: > > I find it counter-intuitive p=randomprime(2^2000) to be > significantly slower than isprime(p) > > > Session > --- > default(timer,1) > setrand(1) > p=randomprime(2^2000) > isprime(p) > ispseudoprime(p) > ---