Mail Archives: djgpp/2001/07/25/06:26:26
On Wednesday, July 25, 2001 3:04 PM, I wrote:
> Blind interation loops might be optimized by some CPUs, so in effect
> it
> won't execute those 10000 times. So, it's better that you do
> something like:
>
> movl $1, %eax;
> xorl %eax, %eax;
> xorl %eax, %eax;
> xorl %eax, %eax;
> xorl %eax, %eax;
> xorl %eax, %eax;
> xorl %eax, %eax;
> ....// Around 500-1000 lines of this.
Whoops, that should have been
divl %eax;...repetitive
That takes more CPU cycles.
--
Prashant TR <tr AT midpec DOT com> Web: http://www.midpec.com/
"Those who do not understand Unix are condemned to reinvent it, poorly."
-- Henry Spencer
- Raw text -