pairs from a list

Steven D'Aprano steven at REMOVE.THIS.cybersource.com.au
Tue Jan 22 02:08:43 EST 2008


On Mon, 21 Jan 2008 21:34:28 -0800, George Sakkis wrote:

> I believe the "what is the fastest way" question for such small well-
> defined tasks is worth asking on its own, regardless of whether it makes
> a difference in the application (or even if there is no application to
> begin with). Just because cpu cycles are cheap these days is not a good
> reason to be sloppy. Moreover, often the fastest pure Python version
> happens to be among the most elegant and concise, unlike other languages
> where optimization usually implies obfuscation.

I wonder why it is that people automatically assume that "optimization" 
means optimize the time taken, and not the developer effort to write it 
in the first place, the effort required to maintain it over time, or the 
memory used at runtime, let alone some combination of all four factors.

Memory is cheap, but applications are hungry.

CPUs are fast, and for most applications the difference between 3ms and 
30ms is undetectable by the user. Why do we care so little about saving 
memory and so much about ever-decreasing time savings?



-- 
Steven



More information about the Python-list mailing list