#8614: Optimize creation of modular symbols spaces by speeding up quotienting
out
by 2-term relations
-----------------------------+----------------------------------------------
Reporter: was | Owner: craigcitro
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: modular forms | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Changes (by mraum):
* status: needs_work => needs_review
Old description:
> * 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.
New description:
* 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:'''
1. #10709
'''Apply:'''
1. [attachment:trac-8614-optimize-modular-symbol-relations-rebase.patch]
--
Comment:
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:
{{{
%time M = ModularSymbols(1000,2,sign=1).new_subspace().cuspidal_subspace()
%time t3 = M.hecke_matrix(3)
%time time d = t3.decomposition(algorithm='multimodular', height_guess=1)
%time ModularSymbols(2002, 2)
%time ModularSymbols(302, 4)
%time ModularSymbols(Gamma1(33), 4)
%time ModularSymbols(DirichletGroup(308).0, 5)
%time M = ModularSymbols(1, 810, 0, GF(809))
}}}
Without the patch:
{{{
Wall time: 2.92 s
Wall time: 0.19 s
Wall time: 0.09 s
Wall time: 1.34 s
Wall time: 4.08 s
Wall time: 2.20 s
Wall time: 10.97 s
Wall time: 16.23 s
}}}
With the patch applied:
{{{
Wall time: 2.77 s
Wall time: 0.13 s
Wall time: 0.09 s
Wall time: 1.22 s
Wall time: 4.38 s
Wall time: 2.10 s
Wall time: 11.12 s
Wall time: 15.33 s
}}}
None of the differences is significant in the sense that %timeit could
reproduce it. A profile
{{{
%prun M = ModularSymbols(Gamma1(52), 4)
}}}
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
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8614#comment:10>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.