[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Functions locality and instruction fetch
On Mon, 28 Jan 2013 17:44:11 -0500
Julio Merino <julio%meroh.net@localhost> wrote:
> On Sun, Jan 27, 2013 at 12:14 PM, Sad Clouds
> <cryintothebluesky%googlemail.com@localhost> wrote:
> > Hello,
> > I remember some years ago I was playing with Sun Studio compilers on
> > Solaris. I don't remember the exact commands/options, but there was
> > a way to run your code under a special profiler, which would output
> > locality information about various functions into a file. Then you
> > could use this file as input to a compiler, which would generate
> > executable code, where frequently called functions were placed
> > closer to each other. In theory this would improve performance due
> > to locality of reference.
> > I don't think GCC has anything of that kind, so I thought maybe the
> > order in which you write functions in source files has similar
> > effects.
> Indeed, it seems GCC does not support this. But IIRC, llvm does
> support profile-based optimization. You might want to play with that.
> Julio Merino / @jmmv
Thanks for the pointers, I'll check out LLVM.
Main Index |
Thread Index |