Passing arguments a template parameters vs. function parameters
    John Colvin 
    john.loughran.colvin at gmail.com
       
    Tue Jun 11 15:22:20 PDT 2013
    
    
  
On Tuesday, 11 June 2013 at 22:13:18 UTC, bearophile wrote:
>
> If you want to do benchmarks don't forget to do them with a 
> better compiler, like LDC2, that is able to use that 
> compile-time information to optimize better.
>
> When I have written that code I was using only DMD. I have just 
> started to use LDC2 and I have not yet timed that particular 
> program with LDC2.
>
> Bye,
> bearophile
If I was a gambling man I'd put money on seeing a bigger change 
in DMD than in ldc2/gdc. I reckon dmd will make use of the 
compile time argument to optimise, whereas the more advanced 
compilers will be able to prove it's constant either way.
I'm interested to know now!
    
    
More information about the Digitalmars-d-learn
mailing list