[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.8?] rules.mak: speedup save-vars load-vars

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH for-2.8?] rules.mak: speedup save-vars load-vars
Date: Thu, 3 Nov 2016 09:38:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0

On 03/11/2016 07:16, Fam Zheng wrote:
> 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 <address@hidden>
>> ---
>>      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 <address@hidden>
>>      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?

In theory it would be
http://lists.gnu.org/archive/html/bug-make/2016-10/index.html but I
cannot see it there yet.

Anyway it's not rocket science: use strchr instead of a hand-rolled
while loop, improve hash functions, and an optimized version of strpbrk
using SSE2.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]