cpu_features icon indicating copy to clipboard operation
cpu_features copied to clipboard

should use builtin_cpu_supports on gnu/linux

Open shawnl opened this issue 6 years ago • 1 comments

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.

shawnl avatar May 21 '19 23:05 shawnl

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.

gchatelet avatar Jun 13 '19 09:06 gchatelet