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
Optimize creation of modular symbols spaces by speeding up quotienting out by 2-term relations #8614
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
Attachment: trac_8614.patch.gz |
comment:3
Which cases do you expect to be most speeded up by this patch? I ran some tests and it actually seems to make things marginally slower in the cases I tried: Before:
After:
|
comment:6
It appears to be significantly better for high weights: On sage-4.6.1, before the patch:
After the patch:
This makes me very happy. |
comment:7
According to the profiler, that difference seems to be coming almost entirely from the optimizations to I suggest we split this into two tickets: one for the changes to binomial and the other miscellaneous fixes, which I would be happy to give a positive review to on the spot, and the other for the cythonization of the 2-term relations stuff, which seems a bit less clear-cut to me. |
comment:8
Replying to @loefflerd:
I agree, and I had noticed the point about |
comment:9
OK, so I have split off the part not directly involved in the 2-term relations into two other tickets: #10709 for the binomial coefficients in the matrix actions on Manin symbols, and #10710 for the various docstring/doctest/comment fixes. I will soon update the patch on this ticket by removing those parts. |
comment:10
Attachment: trac-8614-optimize-modular-symbol-relations-rebase.patch.gz I rebased the patch to 4.7alpha2 (with #10709 applied). Its not true that the new code is slower. I ran the following small tests:
Without the patch:
With the patch applied:
None of the differences is significant in the sense that %timeit could reproduce it. A profile
shows that indeed the new code is three times as fast as the old one. But since the relevant function only needs 0.1s and 0.03s, respectively, this can be hardly tracked. Martin |
This comment has been minimized.
This comment has been minimized.
comment:11
The patch looks good to me (applied to 4.7.alpha2) and I am testing now, by testing whether ModularSymbols(N) and CremonaModularSymbols(N) have the same dimension for N up to |
comment:12
Replying to @JohnCremona:
This is enough to convince me that the implementation is ok. I tested the complete library too. |
Author: William Stein |
Reviewer: Alex Ghitsa, David Loeffler, John Cremona |
Merged: sage-4.7.alpha5 |
Changed reviewer from Alex Ghitsa, David Loeffler, John Cremona to Alex Ghitza, David Loeffler, John Cremona |
The attached patch speeds up a creating ModularSymbols spaces a bunch by removing a bottleneck -- quotienting by 2-term relations -- by moving it to Cython.
Also the coverage for the modular/modsym directory is improved to 100% by adding one trivial missing doctest.
Likewise, the coverage for the modular/modform directory is improved to 100% by adding another trivial doctest.
Depends on:
Apply:
CC: @aghitza
Component: modular forms
Author: William Stein
Reviewer: Alex Ghitza, David Loeffler, John Cremona
Merged: sage-4.7.alpha5
Issue created by migration from https://trac.sagemath.org/ticket/8614
The text was updated successfully, but these errors were encountered: