maximum() efficency

Arne Ludwig arne at citde.net
Mon Mar 27 10:50:01 EST 2006


Just for completeness: The functions in Steve's original post named
maximum calculate the minimum.

Also, timing-wise, on my machine with a random list of 200000 integers
Steve's iteration version and Mitja's version are about equal, the
system built-in is equal or slightly slower, and Paul's version about
3-4x slower. If the comparison function is very complex, the mileage
may vary of course.




More information about the Python-list mailing list