All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Nigel Horne <njh@bandsman.co.uk>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Arm emulation tweak
Date: Tue, 18 Aug 2009 17:14:24 +0100	[thread overview]
Message-ID: <20090818161424.GA1435@shareable.org> (raw)
In-Reply-To: <4A8ACF77.3090801@bandsman.co.uk>

Nigel Horne wrote:
> This small patch reduces (on my machine) the call to new_tmp by 16 
> bytes, which may not sound much, but it's called so often that it makes 
> a nice speed up of Arm emulation:

>      if (GET_TCGV_I32(temps[num_temps]))
>        return temps[num_temps++];
> 
> !     tmp = tcg_temp_new_i32();
> !     temps[num_temps++] = tmp;
> !     return tmp;
>  }

becomes

>      if (GET_TCGV_I32(temps[num_temps]))
>        return temps[num_temps++];
> 
> !     return temps[num_temps++] = tcg_temp_new_i32();
>  }

That's pretty tragic if GCC fails to compile them to identical code,
assuming you had optimisation turned on.

Have you tried building with -Os, -O2 etc. to see if that makes a
difference?

Which GCC version are you using?

-- Jamie

  reply	other threads:[~2009-08-18 16:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-18 15:57 [Qemu-devel] Arm emulation tweak Nigel Horne
2009-08-18 16:14 ` Jamie Lokier [this message]
2009-08-19  9:46   ` Filip Navara
2009-08-19 10:12     ` Nigel Horne
2009-08-19 10:38       ` Filip Navara

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=20090818161424.GA1435@shareable.org \
    --to=jamie@shareable.org \
    --cc=njh@bandsman.co.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.