On 11/09/2015 07:51 PM, Liang Li wrote: > buffer_find_nonzero_offset() is a hot function during live migration. > Now it use SSE2 intructions for optimization. For platform supports > AVX2 instructions, use the AVX2 instructions for optimization can help > to improve the performance about 30% comparing to SSE2.
Rather than trying to cater to multiple assembly instruction implementations ourselves, have you tried taking the ideas in this earlier thread? https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg05298.html Ideally, libc's memcmp() will already be using the most efficient assembly instructions without us having to reproduce the work of picking the instructions that work best. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature