[H-GEN] optimization

Jason Parker-Burlingham jasonp at uq.net.au
Wed Feb 19 13:10:06 EST 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

"irwa82 at froggy.com.au" <irwa82 at froggy.com.au> writes:

> I am going to do some system optimization by compiling my programs
> from source with optimization for my cpu, the only options I have
> found so far are -O3 -march="k7" I have an amd duron which I believe
> is a k7.

I'm going to try to elaborate somewhat on Greg's advice.

The first thing to do, if you're thinking of optimizing like this, is
to work out what you want to be able to do faster.  Recompiling the
system wholesale is probably overkill---do you *really* need an od(1)
binary that runs 3--10% faster than before, if you're hardly ever
going to use it?  Will fast math operations, or unrolled loops, really
help od(1) anyway?

Thinking generally about *my* system, the best candidates for
optimization would probably be the X server (though I could just
purchase a fancier graphics card instead), maybe some parts of the
kernel (though I could just buy faster disks, instead), and *maybe*
the perl binary and some of its libraries.

Now, if you have candidates that really *will* benefit from
recompilation (say, POVRAY or something) it's going to be a good idea
to run some benchmarks to work out where the process spends most of
its time---is it waiting for user input?  There's not much to do about
that.  Is it paging a lot, or otherwise churning the disk?  In short:
*is the process actually spending time doing something you can make
faster by recompiling*?

If you can't answer that question, then most of the time you'll spend
recompiling the whole system---something I'm assuming you're
doing---is best considered time wasted.
-- 
``I may have agreed to something involving a goat.''  -- CJ

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list