On 8/11/22 08:14, Alex Bennée wrote:
The class cast checkers are quite expensive and always on (unlike the
dynamic case who's checks are gated by CONFIG_QOM_CAST_DEBUG). To
avoid the overhead of repeatedly checking something which should never
change we cache the CPUClass reference for use in the hot code paths.

Signed-off-by: Alex Bennée<alex.ben...@linaro.org>
---
  include/hw/core/cpu.h | 9 +++++++++
  cpu.c                 | 9 ++++-----
  2 files changed, 13 insertions(+), 5 deletions(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to