Re: [PATCH v1 2/8] cpu: cache CPUClass in CPUState for hot code paths

2022-08-11 Thread Philippe Mathieu-Daudé via
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

Re: [PATCH v1 2/8] cpu: cache CPUClass in CPUState for hot code paths

2022-08-11 Thread Richard Henderson
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

[PATCH v1 2/8] cpu: cache CPUClass in CPUState for hot code paths

2022-08-11 Thread Alex Bennée
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 B