#6019: [with patch, needs review] speed up new_subspace by a factor of > 100
---------------------------+------------------------------------------------
 Reporter:  davidloeffler  |       Owner:  craigcitro
     Type:  defect         |      Status:  new       
 Priority:  major          |   Milestone:  sage-4.0  
Component:  modular forms  |    Keywords:            
---------------------------+------------------------------------------------
Description changed by davidloeffler:

Old description:

> I forgot to disable the automatic Hecke-invariance check, and to use the
> already-calculated dual free module, when calling the submodule
> constructor to constructing new subspaces of modular forms spaces.
>
> That meant that the very time-consuming functions
> {{{_is_hecke_invariant_free_module}}} and {{{dual_free_module}}} were
> getting called, which slowed down the computation *ridiculously*.
>
> Before:
> {{{
> sage: C = CuspForms(12, 8)
> sage: time C.new_submodule()
> CPU times: user 217.98 s, sys: 0.39 s, total: 218.37 s
> Wall time: 229.00 s
> Modular Forms subspace of dimension 2 of Modular Forms space of dimension
> 17 for Congruence Subgroup Gamma0(12) ofweight 8 over Rational Field
> }}}
>
> After:
> {{{
> sage: time C.new_submodule()
> CPU times: user 1.55 s, sys: 0.02 s, total: 1.57 s
> Wall time: 1.58 s
> Modular Forms subspace of dimension 2 of Modular Forms space of dimension
> 17 for Congruence Subgroup Gamma0(12) ofweight 8 over Rational Field
> }}}
>
> So that's a speedup by a factor of 139 in this example.

New description:

 I forgot to disable the automatic Hecke-invariance check when calling the
 submodule constructor to constructing new subspaces of modular forms
 spaces.

 That meant that the very time-consuming function
 {{{_is_hecke_invariant_free_module}}} was getting called, which slowed
 down the computation *ridiculously*.

 Before:
 {{{
 sage: C = CuspForms(12, 8)
 sage: time C.new_submodule()
 CPU times: user 217.98 s, sys: 0.39 s, total: 218.37 s
 Wall time: 229.00 s
 Modular Forms subspace of dimension 2 of Modular Forms space of dimension
 17 for Congruence Subgroup Gamma0(12) ofweight 8 over Rational Field
 }}}

 After:
 {{{
 sage: time C.new_submodule()
 CPU times: user 1.55 s, sys: 0.02 s, total: 1.57 s
 Wall time: 1.58 s
 Modular Forms subspace of dimension 2 of Modular Forms space of dimension
 17 for Congruence Subgroup Gamma0(12) ofweight 8 over Rational Field
 }}}

 So that's a speedup by a factor of 139 in this example.

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6019#comment:1>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to