force-inline forceValue

forceValue is extremely hot. interestingly adding likeliness annotations
to the branches does not seem to make a difference.

before:

  Time (mean ± σ):      4.224 s ±  0.005 s    [User: 3.711 s, System: 0.512 s]
  Range (min … max):    4.218 s …  4.234 s    10 runs

after:

  Time (mean ± σ):      4.140 s ±  0.009 s    [User: 3.647 s, System: 0.492 s]
  Range (min … max):    4.130 s …  4.152 s    10 runs
This commit is contained in:
pennae 2023-12-11 15:54:16 +01:00
parent 69ed4aee61
commit f9db4de0f3

View file

@ -81,6 +81,7 @@ Env & EvalState::allocEnv(size_t size)
}
[[gnu::always_inline]]
void EvalState::forceValue(Value & v, const PosIdx pos)
{
if (v.isThunk()) {