-
-
Notifications
You must be signed in to change notification settings - Fork 655
Closed
Milestone
Description
Currently, EllipticCurveIsogeny.dual()
contains a few calls of the form phi.formal()[1]
where phi
is an isogeny. Since we only need the leading coefficient, using the default precision 20
is wasteful: we can pass prec=2
instead.
Moreover, self.formal()[1]
is computed twice in the code; we should reuse it.
Example:
sage: E = EllipticCurve(j=GF(431^2)(4))
sage: phi = E.isogeny(2^99*E.gens()[0])
sage: phi
Isogeny of degree 27 from Elliptic Curve defined by y^2 = x^3 + x over Finite Field in z2 of size 431^2 to Elliptic Curve defined by y^2 = x^3 + (237*z2+278)*x + (412*z2+74) over Finite Field in z2 of size 431^2
sage: %timeit phi.dual(); phi._EllipticCurveIsogeny__dual = None
9.5.rc3:
1.37 s ± 4.16 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
This branch:
896 ms ± 1.91 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
CC: @JohnCremona @categorie @defeo
Component: elliptic curves
Author: Lorenz Panny
Branch/Commit: 9203fa2
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/33216