CTFE-PGO ... Because I was bored

Era Scarecrow via Digitalmars-d digitalmars-d at puremagic.com
Tue Dec 13 22:00:08 PST 2016


On Wednesday, 14 December 2016 at 05:07:17 UTC, Stefan Koch wrote:
> I have just written a little piece of code that counts which 
> switch-cases are executed most frequently versus how often 
> their conditions are evaluated.
>
> This can essentially be the basis for pgo based on the 
> ctfe-function path. Since functions are supposed to be the same 
> at ctfe and at runtime, you basically get profiling information 
> for free while compiling.

  Aside from just counting the results, is this going to possibly 
affect compilation/code generation to get speed/size optimization?


More information about the Digitalmars-d mailing list