To reply to my own mail, I see that the type(F8)!=type(F7) and it certainly makes sense that arithmetic in the simpler prime order field is faster. The reason I brought it up is that it made a very significant difference in a computation where I thought the base-field was not overly significant.
-- Joel On Thu, Feb 01, 2007 at 01:55:50PM -0500, Joel B. Mohler wrote: > > Consider the following timings for making random polynomials over some finite > fields. Note that the arithmetic with the field of non-prime order is 3x > slower > than the field of finite order. Strangely enough, the generation of a random > element seems decidedly pointing in the opposite direction (or am I confused > with the loop counts? -- they always trip me up). > > sage: F8=GF(8,'a') > sage: F7=GF(7) > sage: P8, t8 = PolynomialRing( F8, 't').objgen() > sage: P7, t7 = PolynomialRing( F7, 't').objgen() > sage: timeit sum([F8.random_element()*t8**i for i in range(4)]) > 100 loops, best of 3: 12.7 ms per loop > sage: timeit sum([F7.random_element()*t7**i for i in range(4)]) > 100 loops, best of 3: 4.27 ms per loop > sage: timeit F8.random_element() > 100000 loops, best of 3: 3.22 ?s per loop > sage: timeit F7.random_element() > 10000 loops, best of 3: 57.5 ?s per loop > > I haven't looked at the code yet. I just wanted to see if a guru (Martin?) > had > any understanding of the descrepancy ... and whether it is fixable. > > -- > Joel > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---
