From: Karl Magdsick <kmagnum@gmail.com>
To: qemu-devel@nongnu.org
Cc: Daniel Egger <degger@fhm.edu>
Subject: Re: [Qemu-devel] [Patch] Clear memory using memset instead of handcoded loop
Date: Sun, 3 Oct 2004 14:17:33 -0400 [thread overview]
Message-ID: <cd8ecdef041003111737d70a83@mail.gmail.com> (raw)
In-Reply-To: <C6661EF0-1531-11D9-8DA6-000A958E35DC@fhm.edu>
Daniel,
Good catch!
Is the section still a hot spot in your tests? Maybe a macro or
inline function would be more appropriate. The macro/inline function
could be defined to use memset for now, and later changed to use
optimized inline assembly language on architectures that don't inline
memset. It is also likely possible to write a slightly faster inline
assembly routine since we know that we want to always set the memory
to zero, while memset has to allow for an arbitrary fill value.
-Karl
On Sun, 3 Oct 2004 13:45:51 +0200, Daniel Egger <degger@fhm.edu> wrote:
> Hija,
>
> while profiling the lastest qemu snapshot on OS X I discovered
> that one of the tb_hash clearing routines turnes up to be a
> "hotspot" during my typical test procedure which includes
> booting an installed Debian Sarge RC.
>
> Attached patch turnes three handcoded memory clearing routines
> into a call to memset which will be optimized by every serious
> compiler into either a very optimized inline sequence for the
> CPU or at least into a call of an optimized memory clearing
> function (bzero on Darwin 7.5 with gcc 3.3).
>
> Please CC me on replies.
>
>
>
>
> Servus,
> Daniel
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
>
>
>
next prev parent reply other threads:[~2004-10-03 18:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-03 11:45 [Qemu-devel] [Patch] Clear memory using memset instead of handcoded loop Daniel Egger
2004-10-03 13:38 ` Fabrice Bellard
2004-10-03 18:17 ` Karl Magdsick [this message]
2004-10-04 0:15 ` Daniel Egger
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=cd8ecdef041003111737d70a83@mail.gmail.com \
--to=kmagnum@gmail.com \
--cc=degger@fhm.edu \
--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).