Hi! > I will open a ticket, I think.
Done: #6208, with patch, needs review. Example from the ticket: Without my patch sage: G=SymmetricGroup(7) sage: time L=[X for X in G if X.order()==2] CPU times: user 10.19 s, sys: 2.12 s, total: 12.31 s Wall time: 15.48 s With my patch sage: G=SymmetricGroup(7) sage: time L=[X for X in G if X.order()==2] CPU times: user 4.02 s, sys: 0.17 s, total: 4.19 s Wall time: 6.13 s But, Jerome, I am still unable to explain your timings. For example, I have: sage: G=SymmetricGroup(5) sage: H1=G.subgroup(G.gens()) sage: H2=G.subgroup(G.gens()) sage: H1 is H2 False sage: time H1==H2 CPU times: user 0.00 s, sys: 0.00 s, total: 0.01 s Wall time: 0.01 s True sage: time H1.list()==H2.list() CPU times: user 0.88 s, sys: 0.20 s, total: 1.08 s Wall time: 1.42 s True So, the answer of ``H1==H2`` is immediate, while the construction of the list of elements is rather sluggish. But note that the list of elements is cached. Hence, when one compares the lists a second time then one has no time spent: sage: time H1.list()==H2.list() CPU times: user 0.00 s, sys: 0.00 s, total: 0.00 s Wall time: 0.00 s True But as much as I see, your timings can not be explained by cacheing, since you call the ``list()`` method only once for each subgroup. Best regards, Simon --~--~---------~--~----~------------~-------~--~----~ 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-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
