[patch][rfc] How to handle static constructors on linux

Cary Coutant ccoutant@google.com
Mon Jun 18 18:59:00 GMT 2012


> But I am still missing something, why is the performance so different?
> Code layout putting the constructors' body in the reverse order they
> are called?

Yes, as I understand it. Cache and TLB prefetching works better when
code executes from lower to higher addresses than when executing from
higher to lower.

-cary



More information about the Gcc mailing list