Jeff Abrahamson on 11 Jan 2004 14:01:15 -0000 |
On Sun, Jan 11, 2004 at 12:03:52AM -0500, James E Keenan wrote: > So this is a good reason to use the Schwartzian Transform -- but how big > a list do we have to have before the Transform becomes faster than a > simple sort? No, I disagree. We should use form C for precisely the reason Mark states: it is clearer to those who follow. I stand by this even if it takes twice as much time, unless you profile and tell me that sometimes this time is significant. Significance (for me) would mean that the improvement from changing to the more dense coding form would be an important improvement in the running time of the code, or else that under some reasonable circumstances a user would have to wait too long for an interactive program. I see neither of these very often in real software, although it happens. Our biggest challenges in software engineering (outside research) is how to make our code maintainable and reduce error rates. Certainly programmer time is the most expensive cost in most projects. Worrying about optimization too early and without profiling is generally a waste of engineering time. The clearer our code is, the more likely we are to write fewer errors and the more easily maintainers can touch our code later. -- Jeff Jeff Abrahamson <http://www.purple.com/jeff/> GPG fingerprint: 1A1A BA95 D082 A558 A276 63C6 16BF 8C4C 0D1D AE4B Attachment:
pgpmnAih5rnGz.pgp
|
|