Computers are fast (was: Recursive list comprehension)
Wed Jan 25 03:16:04 CET 2006
Richard A. O'Keefe wrote:
> maybe they're right to dismiss the cost as a sacrifice for
> provably correct programs,
> But they *DON'T* dismiss cost as an issue. They just aren't one-eyed
> and prejudiced about it. They are aware that development time is a cost.
> They are aware that a high level language enlarges the scope of what you
> *CAN* program at all. They are aware that cheap ($1000) computers are
> now more than a thousand times faster than expensive ($1000000) mainframes
> of 25 years ago and have about a thousand times as much memory.
Absolutely. Recently, during the development of a soft real-time program, I
accidentally left on a debugging option that was dumping megabytes per second
of barely useful debug information to disk. But the machine was so damn fast
that this wasn't at all noticeable from the program's performance, and it
still met its real-time deadlines.
Some programmers, usually those who do almost all their programming in C,
C++ and similar languages, seem to be obsessed with low level optimizations
that shave off a few cycles here and there. They haven't internalized just
how fast modern computers are capable of running.
When a program runs perceptibly slowly, it is almost always due to misdesign,
not programming language. Slow applications (and operating systems) are slow
because they're doing the wrong thing, not because they're doing the right
thing slowly. To effectively optimize at a high level, you need a high level
David Hopwood <david.nospam.hopwood@REDACTED>
More information about the erlang-questions