John Jones on Thu, 08 May 2014 21:44:57 +0200

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

Re: Factoring small numbers

Maybe the time is being used to ensure more robustness?  For me

t0 := Runtime();; for i in [1..10000] do FactorsInt(19180172397815991981 + i); od; Runtime() - t0;

fails in gap, but the gp equivalent

for(j=1,10000, factorint(19180172397815991981+j))

finished in 4.4 seconds.


On Thu, May 8, 2014 at 12:25 PM, Jeroen Demeyer <> wrote:
On 2014-05-08 18:45, Igor Schein wrote:
gp takes under 3ms to factor 19180172397815991981.  Hard to beat that IMO.
 ┌───────┐   GAP, Version 4.7.4 of 20-Feb-2014 (free software, GPL)
 │  GAP  │
 └───────┘   Architecture: x86_64-unknown-linux-gnu-gcc-default64

gap> t0 := Runtime();; for i in [1..1000] do FactorsInt(19180172397815991981); od; Runtime() - t0;

That's 51 microseconds(!) to factor 19180172397815991981 in GAP.
Beats PARI hands down.