From ilug-admin@linux.ie  Mon Jul 29 11:28:11 2002
Return-Path: <ilug-admin@linux.ie>
Delivered-To: yyyy@localhost.netnoteinc.com
Received: from localhost (localhost [127.0.0.1])
	by phobos.labs.netnoteinc.com (Postfix) with ESMTP id 1FDD044152
	for <jm@localhost>; Mon, 29 Jul 2002 06:25:15 -0400 (EDT)
Received: from phobos [127.0.0.1]
	by localhost with IMAP (fetchmail-5.9.0)
	for jm@localhost (single-drop); Mon, 29 Jul 2002 11:25:15 +0100 (IST)
Received: from lugh.tuatha.org (root@lugh.tuatha.org [194.125.145.45]) by
    dogma.slashnull.org (8.11.6/8.11.6) with ESMTP id g6SFRPi10957 for
    <jm-ilug@jmason.org>; Sun, 28 Jul 2002 16:27:25 +0100
Received: from lugh (root@localhost [127.0.0.1]) by lugh.tuatha.org
    (8.9.3/8.9.3) with ESMTP id QAA10247; Sun, 28 Jul 2002 16:22:18 +0100
X-Authentication-Warning: lugh.tuatha.org: Host root@localhost [127.0.0.1]
    claimed to be lugh
Received: from mail04.svc.cra.dublin.eircom.net
    (mail04.svc.cra.dublin.eircom.net [159.134.118.20]) by lugh.tuatha.org
    (8.9.3/8.9.3) with SMTP id QAA10213 for <ilug@linux.ie>; Sun,
    28 Jul 2002 16:22:13 +0100
Message-Id: <200207281522.QAA10213@lugh.tuatha.org>
Received: (qmail 18612 messnum 1118184 invoked from
    network[159.134.159.33/p289.as1.drogheda1.eircom.net]); 28 Jul 2002
    15:21:42 -0000
Received: from p289.as1.drogheda1.eircom.net (HELO there) (159.134.159.33)
    by mail04.svc.cra.dublin.eircom.net (qp 18612) with SMTP; 28 Jul 2002
    15:21:42 -0000
Content-Type: text/plain; charset="iso-8859-1"
From: John Gay <johngay@eircom.net>
To: ilug@linux.ie
Date: Sun, 28 Jul 2002 12:28:05 +0100
X-Mailer: KMail [version 1.3.2]
References: <200207280529.GAA17323@lugh.tuatha.org>
In-Reply-To: <200207280529.GAA17323@lugh.tuatha.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: [ILUG] Re: ILUG digest, Vol 1 #2734 - 11 msgs
Sender: ilug-admin@linux.ie
Errors-To: ilug-admin@linux.ie
X-Mailman-Version: 1.1
Precedence: bulk
List-Id: Irish Linux Users' Group <ilug.linux.ie>
X-Beenthere: ilug@linux.ie

On Sun 28 Jul 2002 06:29, ilug-admin@linux.ie wrote:
> Message: 3
> From: "John Moran" <arronax@eircom.net>
> To: "ILUG" <ilug@linux.ie>
> Subject: RE: [ILUG] Optimizing for Pentium Pt.2
> Date: Sat, 27 Jul 2002 17:10:39 +0100
>
> gcc, glibc and binutils, which the lfs site says not to optimise,
> already determines what system you're compiling on, and optimises itself
> to that. That's my understanding of how it works anyway.
>
> John
>
> Subject: Re: [ILUG] Optimizing for Pentium Pt.2

That was my understanding too, but I since fould out that for Linux:

Most programs and libraries by default are compiled with optimizing level 2
(gcc options -g and -O2) and are compiled for a specific CPU. On Intel 
platforms software is compiled for i386 processors by default. If you don't
wish to run software on other machines other than your own, you might want to
change the default compiler options so that they will be compiled with a 
higher optimization level, and generate code for your specific architecture.

Therefore:

    export CFLAGS="-O3 -march=<architecture>" &&
    CXXFLAGS=$CFLAGS

This is a minimal set of optimizations that ensures it works on almost all
platforms. The option march will compile the binaries with specific
instructions for that CPU you have specified. This means you can't copy this
binary to a lower class CPU and execute it.

So these are the optimizations I need to worry about, and the optimizations 
that lfs says to disable before compiling GCC or GlibC. However, GlibC seems 
the most likely candidate for optimization since it provides the libs used by 
even the most simple programs to access system calls in the kernel.

I'm still waiting for info from the GCC mailing list RE: optimising/patching 
GCC for performance improvement. So far the only suggestion has been to try 
using icc, Intels C compiler. It's known to work with the kernel, but user 
apps, and I guess libs and such might need rewriting to compile, and I'm not 
prepared to go to this length.

For QT and KDE it seems there are also gains to be made with object 
pre-linking, but there are also risks with this so I'll just have to suck it 
and see. Either way, I'm going to get started building the base today. I'm 
still waiting for some DRI patches for my GVX1 card but it'll probably been 
several days before I'm ready to build X anyway.

Cheers,

	John Gay

-- 
Irish Linux Users' Group: ilug@linux.ie
http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
List maintainer: listmaster@linux.ie


