This is the mail archive of the
guile@cygnus.com
mailing list for the Guile project.
Re: Well, that's interesting.
- To: Lynn Winebarger <owinebar@indiana.edu>
- Subject: Re: Well, that's interesting.
- From: Havoc Pennington <rhp@zirx.pair.com>
- Date: Thu, 10 Jun 1999 17:20:49 -0400 (EDT)
- cc: Mark Galassi <rosalia@lanl.gov>, Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>, Jim Blandy <jimb@red-bean.com>, Guile Discussion <guile@cygnus.com>
On Thu, 10 Jun 1999, Lynn Winebarger wrote:
> This sort of thing would best be in the dynamic linker, not the
> compiler. It would be in a position to dynamically adjust it as the need
> arose, rather than attempting to do statically what is an inherently
> dynamic optimization.
>
It's not in the compiler; what you do is rearrange the library on disk so
that functions used together are close to each other. It takes quite a bit
of time to determine the optimum arrangement; that's what the simulated
annealing algorithm does. Of course the optimum arrangement is only
optimum for some particular pattern of use, so when optimizing you have to
try to simulate "typical" use.
The reason this increases speed is that the kernel loads the library in
pages; if you can reduce the number of pages loaded by getting groups of
functions on the same page, then the kernel won't be doing as much work.
At least, that's my foggy memory of Nat's talk.
Havoc