Searched hist:03587328 (Results 1 – 2 of 2) sorted by relevance
/qemu/include/qom/ |
H A D | object.h | 03587328 Mon May 13 20:22:24 GMT 2013 Anthony Liguori <aliguori@us.ibm.com> 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>
|
/qemu/qom/ |
H A D | object.c | 03587328 Mon May 13 20:22:24 GMT 2013 Anthony Liguori <aliguori@us.ibm.com> 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>
|