I forgot one case. This is weird. Exists seems *faster* than any. That
should never be happening!

sage: L=[1..10^6]
sage: L[10^6-3]=-1
sage: %timeit any(a<0 for a in L)
10 loops, best of 3: 2.47 s per loop
sage: %timeit exists(L, lambda a: a<0)
10 loops, best of 3: 2.83 s per loop
sage: g=lambda a: a<0
sage: %timeit any(g(a) for a in L)
10 loops, best of 3: 1.19 s per loop
sage: %timeit exists(L, g)
10 loops, best of 3: 1.04 s per loop


--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to