Adapting to a specific processor

Manfred Nowak svv1999 at hotmail.com
Thu May 1 04:03:17 PDT 2008


AMD recommends some coding styles like:

- favor conditional execution instructions over branches
- make code paths as straight as possible
- avoid using more than two branches per 16 byte window, in case of
  poor temporal locality
- in general, avoid using more than three branches per 16 byte window
- use far branches only when absolutely necessary
- limit recursivity to a single call site
- ensure that for each call a corresponding return exists
- avoid having code and data mixed up in the same cache line
- dont use self modifying code

http://developer.amd.com/media/SWOpt2FetchBranchPred0208.wmv
[cited 2008/04/30]

How to achieve this in D?

-manfred



More information about the Digitalmars-d mailing list