performance cost of sample conversion

Johan Engelen via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Sep 7 14:28:32 PDT 2017


On Thursday, 7 September 2017 at 05:45:58 UTC, Ali Çehreli wrote:
>
> You have to measure.

Indeed.

> Here's a start:

The program has way too many things pre-defined, and the 
semantics are such that workWithDoubles can be completely 
eliminated... So you are not measuring what you want to be 
measuring.
Make stuff depend on argc, and print the result of calculations 
or do something else such that the calculation must be performed. 
When measuring without LTO, probably attaching @weak onto the 
workWith* functions will work too. (pragma(inline, false) does 
not prevent reasoning about the function)

-Johan



More information about the Digitalmars-d-learn mailing list