On 29.05.2011 16:01, Morten Kloster wrote:
(stefan) wrote:
Hi Morten,
Did you activate compiler optimizations (e.g. use the release build in VS)?
While your patch makes the code easier to read, the GCC output is
the same as for the unchanged code - except for an additional NOP
to ensure optiminal branch target alignment.
-- Stefan^2.
I used TortoiseSVN's release build script, yes (debug build is
SLOW for the tests I use). I'm not surprised that gcc optimizes
it fine without this change, but VS compiler clearly doesn't.
Patch applied (with a minor improvement) as r1128921.
I looked at the code generated by VS2010 and it
does not inline the *__snake function. Although the
compiler does in fact detect the common sub-
expressions (fp[k-1] etc.), the speed-up stems from
a more efficient parameter passing.
Could you please include my email address in replies?
Yes. And per mailing policies, I should have done
so anyways. Sorry, my fault!
-- Stefan^2.