Re: "may or may not", that is the question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Bruant wrote:

> In the gcc manual, p.276 (p.288 of the pdf version), we can read for

This is a meaningless number without specifying which version of the
documentation you're referring to.  (And the PDF is autogenerated from
the texinfo anyway, which is where any change would have to be made.)

> Finally, I would like to know some reason that could make the code
> slower by unrolling loops.

Unrolling significantly increases code size, which means less space in
the cache for other things.  On most modern architectures main memory is
at least an order of magnitude slower than core execution speed, which
means cache misses result in large stalls.  Depending on the degree of
unrolling this can completely overshadow any gains from the things you
listed.  The documentation can't really be any more specific because it
depends enormously on the specific circumstances involved: the code
being compiled, the compiler options in effect, the target architecture,
the specific hardware on which it's executing, etc.

Brian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux