Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should use builtin_cpu_supports on gnu/linux #72

Open
shawnl opened this issue May 21, 2019 · 1 comment
Open

should use builtin_cpu_supports on gnu/linux #72

shawnl opened this issue May 21, 2019 · 1 comment
Assignees

Comments

@shawnl
Copy link

shawnl commented May 21, 2019

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 shawnl changed the title should use builtin_cpu_features on gnu/linux should use builtin_cpu_supports on gnu/linux May 21, 2019
@gchatelet
Copy link
Collaborator

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 👍 reactions though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants