qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [v2 0/2] add avx2 instruction optimization


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [v2 0/2] add avx2 instruction optimization
Date: Tue, 10 Nov 2015 10:30:26 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 10/11/2015 10:13, Juan Quintela wrote:
>> > I rewrite the buffer_find_nonzero_offset() with the 'bool memeqzero4_paolo 
>> > length'
>> > then write a test program to check a large amount of zero pages, and
>> > use the 'time' to
>> > recode the time takes by different optimization. Test result is like this:
>> >
>> > SSE2:
>> > ------------------------------------------------------
>> >               |            test 1         |     test 2
>> > ----------------------------------------------------
>> > Time(S):|       13.696            | 13.533  
>> > ------------------------------------------------
>> >
>> >
>> > AVX2:
>> > -------------------------------------------
>> >               |        test 1     | test 2
>> > -------------------------------------------
>> > Time (S):|      10.583      |  10.306
>> > -------------------------------------------
>> >
>> > memeqzero4_paolo:
>> > ---------------------------------------
>> >               |        test 1     | test 2
>> > ---------------------------------------
>> > Time (S):|      9.718     |  9.817
>> > ----------------------------------------
>> >
>> >
>> > Paolo's implementation has the best performance. It seems that we can
>> > remove the SSE2 related Intrinsics.

Note that you can simplify my implementation a lot, because
buffer_find_nonzero_offset already assumes that the buffer is aligned to
sizeof(VECTYPE), i.e. 16 bytes.  For example you can just check the
first 4 unsigned longs against zero and then call memcmp.

Paolo

> How should I understand that comment?  That you are about to send an
> email to remove the sse2 support and that I can forget about this patch?



reply via email to

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