|
![](/i/fill.gif) |
On 19 Oct 2000 03:59:13 -0400, Warp wrote:
>Thorsten Froehlich <tho### [at] trf de> wrote:
>: Maybe it is optimising, but in a different way than you expect. On the one
>: hand "i" might be needed somewhere else and inc i could only work on
>: register variables (sorry, I don't know x86 assembler too well).
>
> The 'inc' instruction works also directly with memory locations
>(ie. variables) but is slower than an 'inc' on a register. But of course
>loading the variable first on a register, incrementing the register and
>then storing the register on the variable is not faster (it's actually slower,
>I think).
It might pipeline better.
> And besides, if it's not optimizing (as the original poster said), it
>should generate the simplest code, not the fastest.
If it's not optimizing, it's not checking to see whether the result of
the calculation is used, so it always computes it.
--
Ron Parker http://www2.fwi.com/~parkerr/traces.html
My opinions. Mine. Not anyone else's.
Post a reply to this message
|
![](/i/fill.gif) |