From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c2BK5-0000A5-Pm for qemu-devel@nongnu.org; Thu, 03 Nov 2016 02:16:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c2BK2-0001cY-L6 for qemu-devel@nongnu.org; Thu, 03 Nov 2016 02:16:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48502) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c2BK2-0001bk-Ft for qemu-devel@nongnu.org; Thu, 03 Nov 2016 02:16:22 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0E588811D8 for ; Thu, 3 Nov 2016 06:16:21 +0000 (UTC) Date: Thu, 3 Nov 2016 14:16:19 +0800 From: Fam Zheng Message-ID: <20161103061619.GB8860@lemon> References: <1478103841-8686-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1478103841-8686-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH for-2.8?] rules.mak: speedup save-vars load-vars List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org 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 > --- > 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 > 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