Date: Tue, 06 Feb 2001 22:33:14 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: Hans-Bernhard Broeker Message-Id: <6480-Tue06Feb2001223313+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp AT delorie DOT com In-reply-to: <95pk8j$ft4$1@nets3.rz.RWTH-Aachen.DE> (message from Hans-Bernhard Broeker on 6 Feb 2001 19:45:23 GMT) Subject: Re: Function and File ordering and speed optimization References: <3A8049B6 DOT 7C7B7BB1 AT msu DOT edu> <95pk8j$ft4$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: Hans-Bernhard Broeker > Newsgroups: comp.os.msdos.djgpp > Date: 6 Feb 2001 19:45:23 GMT > > Miguel A. Ballicora wrote: > > Dear dgjpp programmers, > > > I have seen on the documentation that the profiler (gprof.exe) can give > > an advice on how to sort the functions in the executable for speed > > optimization. It gives me a list with all the functions. How do I > > achieve that sorting on the executable? > > I don't think it makes any sense to even try. Except for situation > which other compiler optimizations already should have taken care of, > the relative position of functions in address space doesn't make any > difference at all on x86 processors in 32 bit flat mode and using GCC. ??? One thing I'd do is to group functions which are called many times together. This would maximize the probability that they are in the L1 cache most of the time. Why did you think this was unimportant? Am I missing something?