#7414: improve {from,to}_inversion_vector
-----------------------------+----------------------------------------------
Reporter: ylchapuy | Owner: mhansen
Type: defect | Status: needs_review
Priority: major | Milestone: sage-combinat
Component: combinatorics | Keywords:
Work_issues: | Author: Yann Laigle-Chapuy
Reviewer: | Merged:
-----------------------------+----------------------------------------------
Changes (by ylchapuy):
* status: new => needs_review
Comment:
for the record,
before:
{{{
sage: p= Permutations(1000).random_element()
sage: timeit('p.to_inversion_vector()')
5 loops, best of 3: 2.08 s per loop
sage: iv = p.to_inversion_vector()
sage: timeit('sage.combinat.permutation.from_inversion_vector(iv)')
25 loops, best of 3: 9.57 ms per loop
}}}
after:
{{{
sage: p= Permutations(1000).random_element()
sage: timeit('p.to_inversion_vector()')
25 loops, best of 3: 14.7 ms per loop
sage: iv = p.to_inversion_vector()
sage: timeit('sage.combinat.permutation.from_inversion_vector(iv)')
625 loops, best of 3: 1.47 ms per loop
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7414#comment:1>
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
-~----------~----~----~----~------~----~------~--~---