News for hackers. Stuff that matters.
Re:Python idioms by fijal on Monday June 13, 2011 @08:51AM (#2648836)
For what is worth, most "performance" idioms are anti-idioms on PyPy. Especially those:

  sum = 0
  for d in data:
      sum += d
  product = 1
  for d in data:
      product *= d
Are much faster than reduce/map equivalents. The zip/dict example at the end is even more confusing. I'm convinced PyPy would be the fastest on the simplest-possible code (the first one, marked as "bad")

There are no comments on this comment yet.