Charles Greathouse on Thu, 08 May 2014 23:02:07 +0200


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

Re: Factoring small numbers


More data: I had ~70 primes stored, which presumably were tested but this should be fast enough to not distort timings. Full list:

%6157 = [47392381, 49620299, 57735121, 69261971, 78094529, 94957781, 130860199,
199434979, 240088711, 262026467, 277685929, 327141571, 356987159, 984666689, 117
2720609, 2205616169, 2772596459, 4841894819, 5104570123, 12006189421, 1317026956
1, 18671146721, 134597533853, 175774509403, 197384920991, 205864436623, 37349542
7413, 434445574513, 782630568047, 3122721481331, 93197166057943, 370118084366117
, 395621657653429, 793268863868329, 10523270337143867, 153844901960056309, 24539
3561523640963, 264833583219205703, 1449647415604834793, 104537714688315156481, 5
33057872502798481877, 1358122681230804234961, 1737512608551063059489, 3938092534
824516467081, 42832142214886804432769, 2416149541696444378932580061, 80230619902
61520660050431081, 19991689225926389173331982707, 546952214334949725165413166065
3, 99628468762161408191496787009243, 375023707543870812602696049337187, 13765981
721669362586070164343033803, 130267172738882069052650920770169283, 4178601570972
41689213923127778700883, 1197450777785031843026330268600412643, 7923702200009792
7239306056342315444583, 276762066541307283774606226679432910821, 311086486312797
781992676071608151931907, 353965539710416859250144344699677317529, 1854052482369
530794615341356219986554919, 4081709129902308222999603003074942874619, 652326746
7609105072711558816853511948261, 373783572388748899729453533418043629281641, 316
85538240170039252065334572915192370051923, 6629838551019962358037658458637617841
3823675277, 86021801815027179110423675079571051492712518253, 9084182540420554772
3849714995343301944323783219, 106538794420511089693062587358100088913793140421,
2370454814229339718263779609483116945397510338981039]

I can't get the GAP command to work so I can't give comparative timings. But I don't use GAP much so that might merely betray my lack of knowledge there.

Charles Greathouse
Analyst/Programmer
Case Western Reserve University


On Thu, May 8, 2014 at 4:58 PM, Charles Greathouse <charles.greathouse@case.edu> wrote:
(10:46) gp >default(factor_add_primes,0)
(13:51) gp >for(i=1,1000,factor(19180172397815991981))
time = 52,287 ms.

version() gives [2, 8, 0, 16370, "23a2ae3"]. Header is
          GP/PARI CALCULATOR Version 2.8.0 (development 16370-23a2ae3)
           i686 running mingw (ix86/GMP-5.1.3 kernel) 32-bit version
                compiled: Apr 14 2014, gcc version 4.8.2 (GCC)
                            threading engine: single
                 (readline v6.2 enabled, extended help enabled)

Computer is running Windows Vista on an i7. I can give comparative timings on Linux if desired.


Charles Greathouse
Analyst/Programmer
Case Western Reserve University


On Thu, May 8, 2014 at 4:18 PM, Bill Allombert <Bill.Allombert@math.u-bordeaux.fr> wrote:
On Thu, May 08, 2014 at 02:05:38PM -0400, Charles Greathouse wrote:
> Are you sure it's not storing found factors?
>
> removeprimes(setintersect(addprimes(), factor(19180172397815991981)[,1]~));
> default(factor_add_primes,0)
> for(i=1,1000,factor(19180172397815991981))
> ##
>
> I get 52 ms for the factorization, and I don't think my computer is 20
> times slower than yours. (2 or 3 times, maybe.)

Are you using Windows ? pthread ? 32-bit ?

Cheers,
Bill.