Skip to content

What is the unit of hotness? #7

@eqrion

Description

@eqrion

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions