Ilya Zakharevich on Sat, 13 Jan 2024 12:37:11 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Implementation of forprime() and unextprime()


On Sat, Jan 13, 2024 at 12:07:02PM +0100, Bill Allombert wrote:
> On Sat, Jan 13, 2024 at 01:45:43AM -0800, Ilya Zakharevich wrote:
> > On Sat, Jan 13, 2024 at 12:01:52AM +0100, Bill Allombert wrote:
> > > If you like to look at the code, make sure to look at the git master branch,
> > > otherwise this is a bit pointless.
> > 
> > This remark is also a tiny bit pointless without giving the HTTP url
> > to browse…   ⅞ ;―]
> 
> I was quite sure you could find it yourself.

… And I was quite sure you can use my analysis of an older code!

> Yes, we store the product of all primes < 2^i for all i less than 20,
> which we can then use for sieving (for factor(,0))
> 
> ? for(i=1,1000,factor(random(2^1000),2^18))
> With 2.15.4
>   ***   last result computed in 1,865 ms.
> With 2.16.1
>   ***   last result computed in 124 ms.

How interesting!  Thanks!

Still, this does not explain what is so special about 20…

Yours,
Ilya