On 2013-01-24, Jeroen Demeyer <[email protected]> wrote:
> While testing for speed regressions due to #12313, I actually
> encountered a serious slowdown from sage-5.5 to sage-5.6:
>
> def test():
> for count in range(12):
> for n in [2..20]:
> for g in Gamma0(n).gamma_h_subgroups():
> G = g.image_mod_n()
> assert G.order() == Gamma(n).index() / g.index()
>
> time test()
>
>
> The time for this went up from around 30s to 80s.
>
replace
assert G.order() == Gamma(n).index() / g.index()
with
assert ZZ(gap("Size(Elements("+str(G._gap_())+"))")) ==
Gamma(n).index() / g.index()
and get about 2-fold CPU speedup, and about 8-fold wall clock speedup...
Needless to say, wrapping this up in the GAP interface more properly
will give you further increase, and wrapping it in libGAP even more
so...
Dima
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/sage-devel?hl=en.