Messages in this thread | | | Subject | Re: Some functions are not inlined by gcc 3.2, resulting code is ugly | From | Jussi Laako <> | Date | 03 Nov 2002 23:28:05 +0200 |
| |
On Mon, 2002-11-04 at 02:17, Denis Vlasenko wrote:
> Alignment does not eliminate jump. It only moves jump target to 16 byte > boundary.
Exactly. And P4 cache is _very_ bad at anything not 16-byte aligned. The speed penalty is big. This seems to be problem only with Intel CPU's, no such large effects on AMD ones.
> This _probably_ makes execution slightly faster but on average > it costs you 7,5 bytes. This price is too high when you take into account > L1 instruction cache wastage and current bus/core clock ratios.
7.5 bytes is not much compared to possibility of trashed cache or pipeline flush. Do you have execution time numbers of jump to 16-byte aligned address vs unaligned address?
- Jussi Laako [unhandled content-type:application/pgp-signature] | |