qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.8?] rules.mak: speedup save-vars load-vars
Date: Thu, 3 Nov 2016 14:16:19 +0800	[thread overview]
Message-ID: <20161103061619.GB8860@lemon> (raw)
In-Reply-To: <1478103841-8686-1-git-send-email-pbonzini@redhat.com>

On Wed, 11/02 17:24, Paolo Bonzini wrote:
> Unnesting variables spends a lot of time parsing and executing foreach
> and if functions.  Because actually very few variables have to be
> saved and restored, a good strategy is to remember what has to be done
> in load-vars, and only iterate the right variables in load-vars.
> For save-vars, unroll the foreach loop to provide another small
> improvement.
> 
> This speeds up a "noop" build from around 15.5 seconds on my laptop
> to 11.7 (25% roughly).
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> 	I'm wondering if this would be acceptable for 2.8.

I think that's fine if you don't want to bear the slowness in 2.8. But TBH I
haven't really noticed this as an issue myself. Anyway,

Reviewed-by: Fam Zheng <famz@redhat.com>

> 	I also have sent patches to GNU make that save another
> 	20%, down to 9.8 seconds.

Wow, is there a link to the patch?

Thanks,
Fam

  parent reply	other threads:[~2016-11-03  6:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 16:24 [Qemu-devel] [PATCH for-2.8?] rules.mak: speedup save-vars load-vars Paolo Bonzini
2016-11-02 16:40 ` Daniel P. Berrange
2016-11-02 16:45   ` Paolo Bonzini
2016-11-03  6:16 ` Fam Zheng [this message]
2016-11-03  8:38   ` Paolo Bonzini
2016-11-07 12:49 ` Stefan Hajnoczi
2016-11-07 15:38   ` Paolo Bonzini

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=20161103061619.GB8860@lemon \
    --to=famz@redhat.com \
    --cc=pbonzini@redhat.com \
    --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).