From: Paolo Bonzini <pbonzini@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>,
Andreas Faerber <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH for-1.5 1/2] qom: aggressively optimize qom casting
Date: Mon, 13 May 2013 22:54:49 +0200 [thread overview]
Message-ID: <51915319.4090801@redhat.com> (raw)
In-Reply-To: <1368477106-7579-1-git-send-email-aliguori@us.ibm.com>
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 <pbonzini@redhat.com>
next prev parent reply other threads:[~2013-05-13 20:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-13 20:31 [Qemu-devel] [PATCH for-1.5 1/2] qom: aggressively optimize qom casting Anthony Liguori
2013-05-13 20:31 ` [Qemu-devel] [PATCH for-1.5 2/2] qom: add casting statistics Anthony Liguori
2013-05-13 20:54 ` Paolo Bonzini [this message]
2013-05-13 21:04 ` [Qemu-devel] [PATCH for-1.5 1/2] qom: aggressively optimize qom casting Anthony Liguori
2013-05-13 21:13 ` Paolo Bonzini
2013-05-13 22:08 ` Peter Maydell
2013-05-14 0:38 ` Anthony Liguori
2013-05-14 16:11 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51915319.4090801@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).