qemu-devel
[Top][All Lists]
Advanced

[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: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH for-1.5 1/2] qom: aggressively optimize qom casting
Date: Mon, 13 May 2013 23:08:10 +0100

On 13 May 2013 21:31, Anthony Liguori <address@hidden> wrote:
> 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).

That's a lot of hashtable lookups...

> --- a/include/qom/object.h
> +++ b/include/qom/object.h
> @@ -344,6 +344,8 @@ typedef void (ObjectUnparent)(Object *obj);
>   */
>  typedef void (ObjectFree)(void *obj);
>
> +#define OBJECT_CLASS_CAST_CACHE 4

Total nitpick, but shouldn't this be
OBJECT_CLASS_CAST_CACHE_SIZE ?

thanks
-- PMM



reply via email to

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