xemu/include/qom
Anthony Liguori 035873283b qom: aggressively optimize qom casting
This patch adds a small typename cache to ObjectClass.  This allows
caching positive casts within each ObjectClass.  Benchmarking a
PPC workload provided by Aurelien, this patch eliminates every
single g_hash_table_lookup() happening during the benchmark (which
was about 2 million per-second).

With this patch applied, I get exactly the same performance (within
the margin of error) as with --disable-qom-cast-debug.

N.B. it's safe to cache typenames only from the _assert() macros
because they are always called with string literals.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-13 15:27:18 -05:00
..
cpu.h cpu: Move cpu_write_elfXX_note() functions to CPUState 2013-05-01 13:04:19 +02:00
object.h qom: aggressively optimize qom casting 2013-05-13 15:27:18 -05:00
qom-qobject.h qom: move include files to include/qom/ 2012-12-19 08:31:32 +01:00