$10K coding deathmatch
Jonathan Ellis
jonathan at carnageblender.com
Mon Nov 6 14:18:58 MST 2006
On Fri, 3 Nov 2006 08:51:41 -0700, "Dan Stovall" <dbstovall at gmail.com>
said:
> Here's my python version. I think that the list comperhension and use
> of the reduce function might help with the speed. I have read that
> they are supposed to be a bit faster than a standard for loop in
> python.
Only in the special case of the function you are mapping being
implemented in C. Otherwise, a list comprehension will be (slightly)
faster as well as more readable.
-Jonathan
--
C++ is history repeated as tragedy. Java is history repeated as farce. --Scott McKay
More information about the PLUG
mailing list