You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid expensive computations in Stats.record calls
When `Stats.enabled` is false, `Stats.record` should be free, but before
this commit this wasn't the case: since the `n` passed to `record` was
by-value, it had to be evaluated, this is very expensive for calls like:
record("retained typed trees after typer", unit.tpdTree.treeSize)
Before this commit, we got after inlining:
val n = unit.tpdTree.treeSize
Now we get:
def n = unit.tpdTree.treeSize
it'd be even nicer if we didn't generate anything at all, but this
shouldn't have much impact on running time.
0 commit comments