|Yelin Chen on Thu, 27 Oct 2011 07:19:57 +0200|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|RE: polisirreducible(f*Mod(1,2)) vs. factormod(f,2)|
Hi, Please let me know how to take myself out of this email membership? Thanks, Alex. ________________________________________ From: Bill Allombert [Bill.Allombert@math.u-bordeaux1.fr] Sent: Monday, October 24, 2011 5:34 PM To: email@example.com Subject: Re: polisirreducible(f*Mod(1,2)) vs. factormod(f,2) On Mon, Oct 24, 2011 at 07:32:35PM +0400, Max Alekseyev wrote: > Why polisirreducible(f*Mod(1,2)) is not much faster (if fact, even > slightly slower) than factormod(f,2) on average? > Factoring is an overkill for testing irreducibility but that's > currently not true in PARI/GP. > > ? q = vector(1000,i,random(10^4)); > ? for(i=1,#q,factormod( x^q[i]+x+1,2) ) > ? ## > *** last result computed in 4min, 6,019 ms. > ? for(i=1,#q,polisirreducible( (x^q[i]+x+1)*Mod(1,2) ) ) > ? ## > *** last result computed in 4min, 8,812 ms. Currently, the implementation of polisirreducible simply call factor(). Probably because this avoided the duplication of the code to compute the coefficient field (which is a rather fragile operation). Cheers, Bill.