-
Notifications
You must be signed in to change notification settings - Fork 2
Description
In the compilation_order section:
* hotness |U32| defining how often this function is called
It sounds like a goal is to have the hints be concrete facts about program execution, so it would be nice to have a unit for interpreting this.
What if we said that 'hotness' was instead a 'call count' which describes how many times in the 'average program execution' a function was executed? A value of '0' would indicate very cold code that is a candidate for lazy execution. A value of '1' would indicate run once initialization code. Values greater than '1' could then be directly compared against an engines existing tier-up heuristics to see if it's worth eagerly compiling a function.
If you went this route, you could also rename the 'compilation order' field to 'call order' which similarly indicates which order functions execute in an 'average program execution'. The interpretation would be the same as specified though, just a different name.