-
Notifications
You must be signed in to change notification settings - Fork 113
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
Provide option to disable -march=native #204
Comments
Can you expose |
I seem to recall that I'd be inclined to add an optimisation flags CMake option that defaults to |
I’m almost inclined to have march=native disabled by default, if it leads to less confusion like non portable binaries. Especially if, as Matt says, the fast path code gen is similar. I’d hope that anyone doing benchmarking / using snmalloc seriously would read the README, where we can explain how to turn it on. |
Fast path codegen is identical up to jump addresses for malloc/calloc/free. Realloc has a couple of minor differences for working out if it needs to do reallocation. There are a few places where zeroing gets switched to vector instructions from I am going to move to disabled by default, and have an option to turn it on. |
Closed by #206 |
The option
-march=native
enables the compiler to specify code to the current machines CPU capabilities with Clang and GCC. This improves performance.However, if the build and deployment machine are different then this option should not be used as the build machine may have features such as AVX512., which are not supported on the target machine.
We should provide an option to specify the target architecture features.
Options
@davidchisnall, @nwf, @SchrodingerZhu any thoughts on what we should do here? The option will also need exposing through the Rust Crate.
Looking at the codegen,
-march=native
doesn't make much difference and does not affect the fast paths. So I would lean towards option, 1. This will allow us to build the fast code for benchmarking, and if someone needs something more specific we can add it later.The text was updated successfully, but these errors were encountered: