Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faster comparison of elliptic-curve morphisms #38808

Conversation

yyyyx4
Copy link
Member

@yyyyx4 yyyyx4 commented Oct 12, 2024

Here we add two fast checks to the generic comparison method for elliptic-curve morphisms that will quickly detect some pairs of unequal morphisms. In the context of #35949, this speeds up the following example from 5.9 seconds to 1.8 seconds:

sage: E = EllipticCurve(GF((5, 2)), [0,1])
sage: %time _ = list(E.isogenies_degree(27))

Copy link

github-actions bot commented Oct 12, 2024

Documentation preview for this PR (built with commit 64236f9; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@grhkm21
Copy link
Contributor

grhkm21 commented Oct 12, 2024

Not sure why but doctests are failing with some unsorted issue.

@grhkm21
Copy link
Contributor

grhkm21 commented Oct 12, 2024

Oh, because you modified _richcmp_. Of course

@yyyyx4 yyyyx4 force-pushed the public/faster_comparison_of_elliptic_curve_morphisms branch from 35f3f88 to 64236f9 Compare October 12, 2024 18:29
@yyyyx4
Copy link
Member Author

yyyyx4 commented Oct 12, 2024

Oops. Just pushed another version that only runs this check when testing == or !=.

@grhkm21
Copy link
Contributor

grhkm21 commented Oct 12, 2024

I think it looks good, I'll relabel it when doctest is done.

Copy link
Member

@S17A05 S17A05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, and doctests seem to have passed too.

@grhkm21
Copy link
Contributor

grhkm21 commented Oct 14, 2024

Thanks, I forgot about it 🥲

vbraun pushed a commit to vbraun/sage that referenced this pull request Oct 17, 2024
    
Here we add two fast checks to the generic comparison method for
elliptic-curve morphisms that will quickly detect some pairs of unequal
morphisms. In the context of sagemath#35949, this speeds up the following
example from 5.9 seconds to 1.8 seconds:
```sage
sage: E = EllipticCurve(GF((5, 2)), [0,1])
sage: %time _ = list(E.isogenies_degree(27))
```
    
URL: sagemath#38808
Reported by: Lorenz Panny
Reviewer(s): Sebastian A. Spindler
vbraun pushed a commit to vbraun/sage that referenced this pull request Oct 18, 2024
    
Here we add two fast checks to the generic comparison method for
elliptic-curve morphisms that will quickly detect some pairs of unequal
morphisms. In the context of sagemath#35949, this speeds up the following
example from 5.9 seconds to 1.8 seconds:
```sage
sage: E = EllipticCurve(GF((5, 2)), [0,1])
sage: %time _ = list(E.isogenies_degree(27))
```
    
URL: sagemath#38808
Reported by: Lorenz Panny
Reviewer(s): Sebastian A. Spindler
vbraun pushed a commit to vbraun/sage that referenced this pull request Oct 20, 2024
    
Here we add two fast checks to the generic comparison method for
elliptic-curve morphisms that will quickly detect some pairs of unequal
morphisms. In the context of sagemath#35949, this speeds up the following
example from 5.9 seconds to 1.8 seconds:
```sage
sage: E = EllipticCurve(GF((5, 2)), [0,1])
sage: %time _ = list(E.isogenies_degree(27))
```
    
URL: sagemath#38808
Reported by: Lorenz Panny
Reviewer(s): Sebastian A. Spindler
vbraun pushed a commit to vbraun/sage that referenced this pull request Oct 23, 2024
    
Here we add two fast checks to the generic comparison method for
elliptic-curve morphisms that will quickly detect some pairs of unequal
morphisms. In the context of sagemath#35949, this speeds up the following
example from 5.9 seconds to 1.8 seconds:
```sage
sage: E = EllipticCurve(GF((5, 2)), [0,1])
sage: %time _ = list(E.isogenies_degree(27))
```
    
URL: sagemath#38808
Reported by: Lorenz Panny
Reviewer(s): Sebastian A. Spindler
@vbraun vbraun merged commit 28aa6c3 into sagemath:develop Oct 26, 2024
19 of 20 checks passed
@yyyyx4 yyyyx4 deleted the public/faster_comparison_of_elliptic_curve_morphisms branch October 27, 2024 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants