[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread VictorMiller
As far as I know Maxima isn't involved -- I don't think that isogenies uses Maxima. Victor On Aug 3, 6:58 pm, Simon King wrote: > On 4 Aug., 00:29, VictorMiller wrote: > ... > > > > > > >  phi = E.isogeny([E(0),P,-P]) > > for i in xrange(20): timeit('phi(Q)') > > > 625 loops, best of 3: 1.17 m

[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread Minh Nguyen
Hi Victor, On Tue, Aug 4, 2009 at 8:29 AM, VictorMiller wrote: > > I was trying to find out how fast a calculation was (applying an > isogeny of degree on an elliptic curve over > a finite field).  At first I noticed that when I repeated a timeit > call with the same expression I was getting mono

[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread Simon King
On 4 Aug., 00:29, VictorMiller wrote: ... >  phi = E.isogeny([E(0),P,-P]) > for i in xrange(20): timeit('phi(Q)') > > 625 loops, best of 3: 1.17 ms per loop > 625 loops, best of 3: 1.75 ms per loop > 125 loops, best of 3: 2.1 ms per loop > 125 loops, best of 3: 2.22 ms per loop > 125 loops, bes

[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread William Stein
On Mon, Aug 3, 2009 at 4:37 PM, VictorMiller wrote: > > As far as I know Maxima isn't involved -- I don't think that isogenies > uses Maxima. You can prove Maxima isn't involved by doing the computation then exiting sage and seeing if it says "Exiting Maxima" when Sage is quiting. William > > V

[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread VictorMiller
Here are the commands I used: qq = [z for z in primes(10,10+100) if (z%12) == 11] E = EllipticCurve(j=GF(qq[0])(1728)) # E has qq[0]+1 points over GF(qq[0]) factor(qq[0]+1) P = ((qq[0]+1)//3)*E.random_element() K = [E(0),P,-P] phi = E.isogeny(K) for i in xrange(20): timeit('phi(Q)') On

[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread Simon King
Hi! On 4 Aug., 02:31, VictorMiller wrote: > Here are the commands I used: > > qq = [z for z in primes(10,10+100) if (z%12) == 11] > E = EllipticCurve(j=GF(qq[0])(1728)) > # E has qq[0]+1 points over GF(qq[0]) > factor(qq[0]+1) > P = ((qq[0]+1)//3)*E.random_element() > K = [E(0),P,-P] > p

[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread VictorMiller
Sorry, here's the definition of Q: Q = E.random_element() Victor On Aug 3, 8:45 pm, Simon King wrote: > Hi! > > On 4 Aug., 02:31, VictorMiller wrote: > > > Here are the commands I used: > > > qq = [z for z in primes(10,10+100) if (z%12) == 11] > > E = EllipticCurve(j=GF(qq[0])(1728))

[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread Simon King
Hi Victor, On 4 Aug., 03:10, VictorMiller wrote: > Sorry, here's the definition of Q: > > Q = E.random_element() Thanks! So, probably it is unrelated with the ticket I mentioned. Also note that the computation time does not increase monotonely: sage: for i in xrange(20): timeit('phi(Q)') :

[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread William Stein
On Mon, Aug 3, 2009 at 6:10 PM, VictorMiller wrote: > > Sorry, here's the definition of Q: > > Q = E.random_element() > > Victor > > On Aug 3, 8:45 pm, Simon King wrote: >> Hi! >> >> On 4 Aug., 02:31, VictorMiller wrote: >> >> > Here are the commands I used: >> >> > qq = [z for z in primes(1

[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread Dan Shumow
> The above change is very sensible, since we know that outP is on > self.__E2, so should directly create a point on E2 and not check again > that our point is really on E2 (which is very expensive). I agree that we should make the change: else: outP = self.__E2(outP) to

[sage-support] Re: Strange behavior in timeit

2009-08-03 Thread William Stein
On Mon, Aug 3, 2009 at 7:23 PM, Dan Shumow wrote: >> The above change is very sensible, since we know that outP is on >> self.__E2, so should directly create a point on E2 and not check again >> that our point is really on E2 (which is very expensive). > > I agree that we should make the change: >