Hi Alex,

On Sat, Dec 15, 2012 at 09:04:40AM +1100, Alex Ghitza wrote:
> Thanks for the hints.  I hadn't noticed the magic incantation with
> max_slope and length; that's the kind of thing I was looking for.
> 
> There seems to be quite a bit of overhead involved.  Here are some
> timings, where mypartitions() is a naive implementation of an
> algorithm due to Boyer [1], see below.
> ...
> It's not a completely fair comparison, since mypartitions() does not
> create the list of all partitions with the desired properties, but
> rather generates them and then throws them away.  Nevertheless, it
> seems like a big gap.

The theoretically complexity of the generic algorithm behind the scene
is the same (CAT). A big part of the constant time factor should
disappear once the generic algorithm will be Cythoned. Here, I also
suspect that quite some time is spent transforming list's into actual
partition's; again this should disappear once partition's will be
Cythoned. I could not give you a time line however.

If you don't absolutely need speed, I would just use the generic
algorithm. That's will be one less thing to refactor when the
optimization time will finally come.

Cheers,
                                Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
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-devel@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