#11598: Congruence testing for odd modular subgroups
---------------------------------+------------------------------------------
Reporter: davidloeffler | Owner: craigcitro
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7.2
Component: modular forms | Keywords: modular congruence subgroup
Work_issues: | Upstream: N/A
Reviewer: Vincent Delecroix | Author: David Loeffler
Merged: | Dependencies: #11422
---------------------------------+------------------------------------------
Comment(by davidloeffler):
I've done some tests. You made several changes: setting "check=False" in
the constructor; adding a custom {{{__hash__}}} function; and using a set
and a list at the same time. The combined effect of these is dramatic:
BEFORE
{{{
sage: time [len(Gamma0(N).as_permutation_group().odd_subgroups()) for N in
[11..20]]
CPU times: user 14.26 s, sys: 2.34 s, total: 16.60 s
Wall time: 38.00 s
[8, 32, 0, 32, 32, 32, 0, 128, 8, 128]
}}}
AFTER
{{{
sage: time [len(Gamma0(N).as_permutation_group().odd_subgroups()) for N in
[11..20]]
CPU times: user 3.35 s, sys: 0.49 s, total: 3.84 s
Wall time: 4.32 s
[8, 32, 0, 32, 32, 32, 0, 128, 8, 128]
}}}
But one part puzzles me a little. I can see that the first two changes
lead to a dramatic speedup, but it's not totally clear to me what the
advantage of using a set type for the {{{bucket}}} variable is. Could you
explain? Moreover, if the set leads to some speedup, then why keep the
list as well -- why not just {{{return list(bucket)}}} at the end?
Also, you have a random {{{(}}} in a comment at line 2478; it seems odd
not to disable the check parameter in {{{one_odd_subgroup}}}; and the
third and fourth lines in the "Testing randomness" doctest in
{{{one_odd_subgroup}}} seem slightly pointless -- with a random routine,
checking that it works is sensible, but running a test on the output and
ignoring the result seems bizarre.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11598#comment:8>
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.