[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-1.5 1/2] qom: aggressively optimize qom cast

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH for-1.5 1/2] qom: aggressively optimize qom casting
Date: Mon, 13 May 2013 22:54:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4

Il 13/05/2013 22:31, Anthony Liguori ha scritto:
> 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.

Nice!  Perhaps (for 1.6?) we can cache other results than class, so that
interfaces are sped up as well.

Reviewed-by: Paolo Bonzini <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]