Ilya Zakharevich on Thu, 26 Sep 2024 10:36:33 +0200


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

Re: Suspicious average timing of isprime() (maybe a bug?!)


On Tue, Sep 24, 2024 at 08:42:11PM +0200, Bill Allombert wrote:
> With isprime(,2) this is much slower and more bumpy.
> 
> 1e19    8563.500        45880
> 2e19    11670.000       44838
> 4e19    13109.000       44297
> 8e19    25932.000       43762
> 1e20    25657.500       43404
> 2e20    24775.000       42725
> 4e20    24289.500       42300
> 8e20    80724.000       41404
> 1e21    80930.500       41402
> 2e21    79912.000       40757
> 4e21    16539.500       40163
> 8e21    16324.500       39419
> 1e22    16730.000       39582
> 2e22    16481.500       38710
> 4e22    16556.500       38553
> 8e22    16372.500       37802
> 1e23    16268.500       37954
> 2e23    16179.000       37394
> 4e23    31847.500       36879
> 8e23    31660.500       36435
> 
> Do you get something similar ?

I get jumps at the same places, but much less expressed variations
between different chunks:

1e19    18312.550       457665
2e19    20284.250       449605
4e19    21540.700       443260
8e19    28923.950       437461
1e20    28501.950       434090
2e20    27615.900       427974
4e20    26809.350       422382
8e20    58746.950       415756
1e21    58462.450       414056
2e21    57815.600       408566
4e21    24403.350       401265
8e21    24174.200       396126
1e22    24228.400       393752
2e22    23987.250       389569
4e22    23732.600       384823
8e22    23474.400       379336
1e23    23246.050       377295
2e23    23167.550       372843
4e23    38187.800       368239
8e23    37854.200       363116

Yours,
Ilya