[CLUE-Tech] KISS session tomorrow

Dave Anselmi anselmi at americanisp.net
Tue Nov 13 10:40:17 MST 2001


Grant Johnson wrote:

> >The bottom line is that hardware is fast and cheap, so optimizing isn't as
> >important as it used to be.  I have some opinions on kernel compiling too, but I
> >see that Dan mentions them in his talk so I'll save them for the meeting.
> >
> It's that attitude that makes my job hard.  Optimizing is ALWAYS
> important.

Sorry, Grant, I didn't mean to make more work for you :-)

> 1)  Optimizing, even on fast hardware means you can do more things at
> once for more people at once.
> 2)  Optimizing for speed usually means finding a simpler way of doing
> things, which in the long run is more maintainable.
> 3)  Those who take the time to optimize are usually those who care about
> their code and how it works, and usually the ones who actually take to
> do other little things like debugging.

Yes, I agree with you entirely.  Write good code, always!  I think it is important
for developers to have an easy way to profile their code so they can spot bottlenecks
and recognize when they've done something suboptimal.  Of course there are tradeoffs,
and sometimes there are excuses to justify not writing good code.  Which is why we
should always check how good our code is and get used to writing it well out of
habit.  If my last company had promoted that practice I might still be there.  (No
flames, please - I realize a paragraph is inadequate to completely discuss this
topic.)

But my post was primarily about running other people's code.  I can't go through KDE
and change it from slow code to fast (I don't know how good their code is, but it is
relatively slow - perhaps justifiably).  So my choice is install and run the KDE
package, or compile it myself.  Optimizing with gcc (that's automatic optimization
that gcc will do for you) doesn't seem to give noticable benefit.  The object
prelinking patches available *do* give noticable benefit, but they are a pain in the
neck and I wouldn't bother if I weren't building KDE from source already (instead,
I'd get a faster WM).

Yes, yes, YES, the KDE people should optimize their code.  Yes, yes, YES, the
distribution people should supply an optimized KDE package (at least where there is a
noticable difference in performance).  No, if you're running KDE on your RH box, I
don't think you should get the source and compile it just so you can see if gcc -O3
or gcc -Os makes it faster.  *Should* you?  No.  *May* you?  Of course, that's why
they call it Free Software.

Cheers!  And thanks for the stimulating discussion.

Dave





More information about the clue-tech mailing list