[uClibc]setjmp/longjmp and others

Shane Nay shane at minirl.com
Tue Jan 8 00:52:24 UTC 2002


> However, ".align 4" is usually used as an optimization in order to
> fit functions into a smaller number of cache lines.  For example,
> if the cache line size is 16 bytes, the function is 24 bytes, and
> starts with alignment 0x...c, then the function will require 3
> cache lines instead of 2, if it were aligned to 16 bytes.  IMHO,
> I think this kind of optimization is bogus, because it doesn't
> actually help in that many cases, and is completely wrong if the
> cache line size isn't 16 bytes.  (I think it's especially bogus
> because you increase the percentage of NOPs in the cache.)

This is an extraordinarily CPU specific performance tweek.  However, 
it is a performance tweek that can really make a very significant 
change on certain platforms.  (Memory bandwidth constricted machines 
especially, like say a 16bit data bus with a 32bit wide instruction 
size)  So, I would argue that it certainly is not bogus, however you 
really need to know so much information about the specific platform 
that stuffing it in everything is extraordinarily unlogical :).

Thanks,
Shane Nay.



More information about the uClibc mailing list