On Thursday, 30 January 2014 at 21:33:38 UTC, bearophile wrote:

If a function takes no time to run, and you tweak it, your program is not supposed to go faster.

Right.

I was going to compare the asm listings, but C++ seems to have unrolled and inlined the outer loop right inside main(), and now I'm slightly lost in it :)

Try using -fkeep-inline-functions.

Thanks.

G++:
http://codepad.org/oOZQw1VQ

LDC:
http://codepad.org/5nHoZL1k


LDC basically generated something that I can only call "one straight *whoooosh*"... This reminds me Andrei's talk on (last years?) GoingNative ("more instructions is not always slower code").

Reply via email to