Hello,

I need for the purpose of my research fast iterator through
set-partitions of a set, let say
sage: SetPartitions(18,[3,3,3,3,3,3]).cardinality()
190590400
The actual version is not convincing in terms of speed, so I started
to rewrote a bunch of combinatorial generation using very basic cython
objects (look at the file fast_generation.pyx in sage/combinat/). Some
of the new iterator are called from combinatorial object and I get
better performances. I'm very careful with testing but it can happen
that some new code break.

old timing:
sage: timeit('list(Subwords(range(10),3))')
625 loops, best of 3: 903 µs per loop

new timing:
sage: timeit('list(Subwords(range(10),3))')
625 loops, best of 3: 86.5 µs per loop

Vincent

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-de...@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to