From: Peter Maydell <peter.maydell@linaro.org>
To: BALATON Zoltan <balaton@eik.bme.hu>
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Subject: Re: [PATCH] bitops.h: Compile out asserts without --enable-debug
Date: Mon, 22 May 2023 13:05:37 +0100 [thread overview]
Message-ID: <CAFEAcA-pxaWN+AQCbzejdy072otR4Sm6hXURW7s8_Eb+cZMBUQ@mail.gmail.com> (raw)
In-Reply-To: <0ab99dea-dbe6-9b3c-37a1-0ad66c0573b2@eik.bme.hu>
On Mon, 22 May 2023 at 13:00, BALATON Zoltan <balaton@eik.bme.hu> wrote:
> On Mon, 22 May 2023, Peter Maydell wrote:
> > Can we have some figures for performance improvements,
> > please? General QEMU policy is that asserts remain,
> > even in non-debug builds, so exceptions from that policy
> > should come with justification with figures attached.
>
> Here are some figures converting a 10MB wav file to mp3 with lame on
> AmigaOS pegasos2 which is using a lot of FPU operations (which is using
> softfloat on TCG target/ppc due to no hardfloat so it's very slow):
>
> 8.0: 1:11 0.8264x, 1:11 0x8258x
> master: 1:12 0.8117x, 1:12 0.8103x
> patch: 1:02 0.9541x, 1:02 0.9506x
Thanks; that does seem like quite a lot of overhead.
> I've never seen these asserts firing and unlikely to depend on run time
> values so leaving them in non-debug builds seems unnecessary overkill that
> also hurts performance.
Where they don't depend on runtime values, the compiler will be
able to detect that the assert condition is always false and
won't emit any code. It's only the cases where the start or
length are variable that will be causing the slowdown.
thanks
-- PMM
next prev parent reply other threads:[~2023-05-22 12:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-20 20:54 [PATCH] bitops.h: Compile out asserts without --enable-debug BALATON Zoltan
2023-05-22 9:16 ` Peter Maydell
2023-05-22 12:00 ` BALATON Zoltan
2023-05-22 12:05 ` Peter Maydell [this message]
2023-05-22 11:26 ` Alex Bennée
2023-05-22 13:25 ` BALATON Zoltan
2023-05-22 16:48 ` Alex Bennée
2023-05-22 22:26 ` BALATON Zoltan
2023-05-22 23:34 ` Richard Henderson
2023-05-23 6:43 ` Alex Bennée
2023-06-05 22:06 ` BALATON Zoltan
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=CAFEAcA-pxaWN+AQCbzejdy072otR4Sm6hXURW7s8_Eb+cZMBUQ@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=balaton@eik.bme.hu \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).