Richard Henderson <richard.hender...@linaro.org> wrote: > Perform the function selection once, and only if CONFIG_AVX512_OPT > is enabled. Centralize the selection to xbzrle.c, instead of > spreading the init across 3 files. > > Remove xbzrle-bench.c. The benefit of being able to benchmark > the different implementations is less important than peeking into > the internals of the implementation.
Agreed. If AVX512 is not better than a plain C implementation, better to not have it O:-) > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> Reviewed-by: Juan Quintela <quint...@redhat.com> Not queued. It needs your other patches, I think it is better that all teh series go through your tree. > +static void __attribute__((constructor)) init_accel(void) > +{ > + unsigned info = cpuinfo_init(); > + if (info & CPUINFO_AVX512BW) { > + accel_func = xbzrle_encode_buffer_avx512; > + } else { > + accel_func = xbzrle_encode_buffer_int; > + } > +} Wow. Comparing it with previous implementation that did it by hand with asm.