Function versioning instead of compilation flags...
Wanting to take advantage of SIMD, we need to compile a different implementation of certain core libraries functions (like
ByteString c_memchr to make it 16x faster).
This would require recompiling most of the libraries for new flags.
Instead, it would be much simpler to add function versioning a la GCC: https://lwn.net/Articles/691932/
This would allow us to write code like this: # target(avx512) # c_memchr = ...SIMD code... # !target(avx512) # c_memchr = ...current code...
We currently use special libraries for these kind of speedups, but it would be much better to use SIMD across few key functions in all libraries to get 16x speedups across the board (
c_memchr for parsing.)
Ideally we could also use it to remove some of flavoring in the future.