Hi folks, I'm trying to showcase the feature introduced by ticket #6381. In the release tour for Sage 4.1.1 at
http://wiki.sagemath.org/sage-4.1.1 you can see the following claim: > (bug in integral_points when rank is large): > > The function integral_x_coords_in_interval() for finding all > integral points on an elliptic curve defined over the rationals > whose x-coordinate lies in an interval is now more efficient when > the interval is large. But on sage.math, I got the following timing statistics which to me indicate that my knowledge of elliptic curves is next to nothing: *** With Sage 4.1 on sage.math [mv...@sage sage-4.1-sage.math.washington.edu-x86_64-Linux]$ ./sage ---------------------------------------------------------------------- | Sage Version 4.1, Release Date: 2009-07-09 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: E = EllipticCurve([0, 0, 1, -7, 6]) sage: %timeit E.integral_x_coords_in_interval(-100, 100); 100 loops, best of 3: 3.38 ms per loop sage: %timeit E.integral_x_coords_in_interval(-500, 500); 100 loops, best of 3: 16.8 ms per loop sage: %timeit E.integral_x_coords_in_interval(-1000, 1000); 10 loops, best of 3: 33.5 ms per loop sage: %timeit E.integral_x_coords_in_interval(-10000, 10000); 10 loops, best of 3: 338 ms per loop sage: %time E.integral_x_coords_in_interval(-10000, 10000); CPU times: user 0.35 s, sys: 0.00 s, total: 0.35 s Wall time: 0.34 s *** With Sage 4.1.1 on sage.math [mv...@sage sage-4.1.1-sage.math.washington.edu-x86_64-Linux]$ ./sage ---------------------------------------------------------------------- | Sage Version 4.1.1, Release Date: 2009-08-14 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- sage: E = EllipticCurve([0, 0, 1, -7, 6]) sage: %timeit E.integral_x_coords_in_interval(-100, 100); 100 loops, best of 3: 3.96 ms per loop sage: %timeit E.integral_x_coords_in_interval(-500, 500); 100 loops, best of 3: 19.6 ms per loop sage: %timeit E.integral_x_coords_in_interval(-1000, 1000); 10 loops, best of 3: 38.9 ms per loop sage: %timeit E.integral_x_coords_in_interval(-10000, 10000); 10 loops, best of 3: 394 ms per loop sage: %time E.integral_x_coords_in_interval(-10000, 10000); CPU times: user 0.39 s, sys: 0.00 s, total: 0.39 s Wall time: 0.39 s This looks more of a speed regression than a speed-up. In which cases, if there are any, would one see a speed increase for the rewritten function integral_x_coords_in_interval()? Are there any code samples to show an efficiency gain with #6381? -- Regards Minh Van Nguyen --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---