Alias/template for value
bearophile
bearophileHUGS at lycos.com
Wed Jul 31 04:53:10 PDT 2013
Joseph Rushton Wakeling:
> Now, I noticed that if instead of declaring the variables
> start, end, I instead
> manually write out these expressions in the code, I get a small
> but consistent
> speedup in the program.
>
> So, I'm curious (i) Why? As I'd have assumed the compiler
> could optimize away unnecessary variables like this,
Take a look at the asm. And try to compile with ldc2 too.
If gdc is missing such small optimization then I suggest to write
a small program that shows the problem, and write a gdc bug
report (that also contains the resulting asm).
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list