On 11/8/22 17: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: Philippe Mathieu-Daudé <f4...@amsat.org>


Reply via email to