Subject: Re: loc measurement for Common Lisp?
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 23 Jan 2001 02:26:29 GMT
Newsgroups: comp.lang.lisp
Message-ID: <94iq4l$1raqd$1@fido.engr.sgi.com>
Erik Naggum  <erik@naggum.net> wrote:
+---------------
|   Then we can always employ the easy route to improvement: Do a bad job on
|   purpose first, evaluate it thoroughly with all possible metrics with a
|   great deal of status and official approval, then do it half as well as
|   you could have done it to begin with, and reevaluate it thoroughly, etc.
|   You win!  Now you can keep doing a better and better job by cutting the
|   distance to how well you could have done it in half each time.  It'll
|   take years before you get fired for this, and who could possibly prove
|   that you did a bad job when you can document your improvement so well?
| 
|   But somebody needs to put such obvious things in a book that sells a lot
|   so Friedrich Dominicus can buy it in a prestigous bookstore _and_ it has
|   to contain the above as an "exercise" before he'll listen to it.  *sigh*
+---------------

Will an expensive, prestigous book containing a "cautionary tale" do
as well as an exercise? If so, Dijkstra's EWD678 "A Story that Starts
with a Very Good Computer"[*] might do the trick. It tells the story of
a comp center that bought a Very Good Computer that had a high-powered
"SORT" instruction... that (oops!) used quite a lot of electricity.
Chagrined by the expense, the boss ordered the programmer of the main
application to do something, and he replaced the SORT instructions by
calls to a routine that partitioned the arrays to be sorted into two
portions such that "the largest element in the left-hand section did
not exceed the smallest element in the right-hand section; thereafter
he gave two SORT-instructions, one for each section."  Which cut the
power used by almost a factor of 2!

All was fine for a time, until the boss came back wanting more savings.
[Most readers of this group can guess the subsequent steps and the final
punchline...]


-Rob

[*] pp.360-362 in Edsger W. Dijkstra, "Selected Writing on
    Computing: A Personal Perspective, Springer Verlag, 1982, or
    scanned at <URL:http://www.cs.utexas.edu/users/EWD/ewd06xx/EWD678.PDF>.

-----
Rob Warnock, 31-2-510		rpw3@sgi.com
SGI Network Engineering		http://reality.sgi.com/rpw3/
1600 Amphitheatre Pkwy.		Phone: 650-933-1673
Mountain View, CA  94043	PP-ASEL-IA