On Sun, 14 Sep 2014, Simon King wrote:

L=[x for x in Posets(7)]

I should have said simply Posets(7).list(), but it doesn't make difference for this.

Concerning the rest of the difference: If you just ask for the posets x
so that x.is_bounded(), then only 63 remain. Hence, x.is_lattice() will
only be called 63 times when you do `x.is_bounded() and x.is_lattice()`.
But when you directly ask for `x.is_lattice()` then it is called
len(L)=2045 times.

Yes. And from this I can go back to real question --- for what to optimize.

Of course we prefer fast code instead of slow. But how we measure speed? When we have is_lattice() at Poset class, should we define 'faster' as "faster on hardest case" or "faster on average"? If latter one, how to define "average"?

I remember that there were some discussion about that when somebody asked about gamma function with high precision.

--
Jori Mäntysalo

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to