cpu_features
cpu_features copied to clipboard
should use builtin_cpu_supports on gnu/linux
i.e. https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/PowerPC-Built-in-Functions.html#PowerPC-Built-in-Functions
this should be a tiny bit faster than getauxval() when it is supported.
Thx for noticing, the code is indeed quite compact. For now I'm a bit reluctant to add optimizations based on compilers because it will make the code more complicated.
The design of this library is to pay a small price at startup to collect features, but it's not designed to pay the smallest price possible.
I'm happy to implement this change if this issue collects many :+1: reactions though.