runsun pan wrote:
I remember reading somewhere that the map, filter, reduce are much
faster than list comp.

It depends.

  map(float, some_list_of_numbers)

is going to be faster than

  [float(x) for x in some_list_of_numbers]

but

  map(lambda x,y: x+y, xs, ys)

is going to be slower than

  import itertools
  [x+y for x,y in itertools.izip(xs, ys)]

--
Robert Kern
[EMAIL PROTECTED]

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to