Alignment from code. 
Author Message
 Alignment from code.

Hi,

Does the alignment from instructions speed up execution ?
Alignment of data will (might ??) help.
But what about instructions ? And how is this achieved, by
using NOP instructions or is there another method ?

Thanks.
Andy.



Sat, 05 Jan 2002 03:00:00 GMT  
 Alignment from code.
On Tue, 20 Jul 1999 16:25:16 +0200, "Andy Peeters"

Quote:
> Hi,

> Does the alignment from instructions speed up execution ?
> Alignment of data will (might ??) help.
> But what about instructions ? And how is this achieved, by
> using NOP instructions or is there another method ?

> Thanks.
> Andy.

When code is aligned NOP instructions are generally used for padding,
at least in all of the assemblers I am familiar with.

Code alignment might speed up execution under some circumstances.  It
varies considerably depending on which processor you use, if you are
talking about the Intel x86 family.  Alignment of data can help quite
a bit as well, again depending on processor.  A misaligned data item
which lies across two cache lines will take longer to read and write.

If you are talking about Intel, go to
http://www.sandpile.org/docs/intel/ia-32.htm and use the links to
download the optimization manuals.

Jack Klein
--
Home: http://home.att.net/~jackklein



Sun, 06 Jan 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Code alignment

2. code alignment question

3. code alignment in wasm

4. q:code alignment to cache boundaries

5. TextEdit right alignment...

6. TextEdit alignment and DateToText yearPivot

7. instruction alignment and DIAG

8. Filling the spaces and retain original characters alignment

9. paragraphs alignment in a editField

10. EditField Alignment

11. EditField Alignment

12. EditField text Alignment

 

 
Powered by phpBB® Forum Software