Hello,

I think it would be better if I put my question in context. In order to
tell the processor that we are in a loop, the pause instruction could be
used (also I think the "rep nop" produces the same opcode). This tells the
processor that we are in a loop so it improves the access to the cache and
the branching mechanism. My question is if the compiler is doing any
improvement of this kind in a loop or I should write my own "pause"
procedure/macro. For more info
https://software.intel.com/en-us/articles/benefitting-power-and-performance-sleep-loops

Cheers!

2017-10-29 16:59 GMT+01:00 Matias Vara <matiasev...@gmail.com>:

> Hello everyone,
>
> I want to implement the cpu_relax() function in order to use it inside
> loops. However before, I would like to know if the fpc compiler is doing an
> optimization of this kind.
>
> Kinds regards, Matias.
>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to