Proper way to write benchmark code...
    Seb via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Mon May 23 05:07:37 PDT 2016
    
    
  
On Monday, 23 May 2016 at 04:11:31 UTC, Era Scarecrow wrote:
>  Is there a good article written for this? Preferably for D 
> specifically...
>
> [...]
you might want to use __gshared data to avoid it being optimized 
away.
>  Is it better to collect all the tests and output the results 
> all at once? Or is it okay or better to output the statistics 
> as they are finished (between benchmarks and before the 
> collection/thread_joinall calls)?
>
> [...]
Unfortunately I can't answer many of your GC-related questions, 
but imho this should get a lot easier and btw many people have 
tried to get something easier into Phobos:
https://github.com/dlang/phobos/pull/2995
https://github.com/dlang/phobos/pull/3695
https://github.com/dlang/phobos/pull/529
    
    
More information about the Digitalmars-d-learn
mailing list