On Sat, 13 Sep 2008 01:06:22 -0700, cnb wrote: > This must be because of implementation right? Shouldn't reduce be faster > since it iterates once over the list? doesnt sum first construct the > list then sum it?
No it doesn't. Why should it? > also, using range instead of xrange doesnt seem to generate a > performance-penalty: (De)Allocating a list of length 100 isn't very slow. Try some million elements. And watch the memory consumption too. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list