Closed hwti closed 3 months ago
Since the avx512 code was never enabled with gcc, does it need tests to make sure it's actually faster than avx2 ? Obviously it might depend on the the machine, I can test on Tiger Lake (i7-11850H, mobile CPU so not optimal for reproducible benchmarks).
Thank you for your feedback and for the patch.
The avx512bw is claimed to be faster by this article: http://0x80.pl/articles/simd-friendly-karp-rabin.html
It looked worthwhile to use. In fact, this is the only piece of code I borrowed from a legitimate source. Everything else in ugrep is written "in house" from scratch, including the SIMD optimizations, tar/zip/pax and decompression code. Some parts I wrote some time ago for other open source projects, such as RE/flex and some other.
The avx512bw is claimed to be faster by this article: http://0x80.pl/articles/simd-friendly-karp-rabin.html
I was thinking about the lower clocks, and clock / voltage transitions which stall or slow down the CPU (see for example https://travisdowns.github.io/blog/2020/01/17/avxfreq1.html, even if newer CPUs are probably less affected).
Unlike clang, gcc fails when using m512 instead of m512i.