Closed htot closed 2 years ago
Thnaks @htot, this is an interesting pull request. I like where this is going and I think it's a good idea to factor out the x86 feature detection bits. I have some ideas about how to enhance this concept and I may come up with a counter-proposal of my own.
Sure, I'll wait to see what you come up with before attempting a v2.
This fixes codec_supported as used by
benchmarks
.benchmarks
forces all codecs built-in at compile time. It does run a test on a test string but this can cause an exception with certain codecs. To this end we factor out cpu capability detection from lib/codec_choose, introduce an additional flag codec flag BASE64_CHECK_SUPPORT, when set this performs cpu capability detection when forced prior to running the test and prevents running the codec if not supported. This ways existing code running the library is not affected.Signed-off-by: Ferry Toth ftoth@exalondelft.nl