-
Notifications
You must be signed in to change notification settings - Fork 16
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
Need to review build options for vigra package #14
Comments
Just for reference, O3 vs O2 enabled the following additional options:
None of those seem to be dangerous and the general opinion these days seems to be that -O3 is fine but does not necessarily increase performance all that much. [2][3][4] That only applies to general programs though and number crunching might benefit more. I recently ran into a -O3 bug anyways which took almost two days to track down [1]. More speedups/better optimized code might be possible by using the -mtune and -march flag though:
This e.g. indirectly enables paired single / vector instruction sets like SSE. The downside for this of course is that compiled binaries would not run on very old CPUs anymore.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68963 |
I just got a report from a user that
that went away with |
Maybe this is obvious, but maybe it's worth trying the clang or gcc "address sanitizer" feature to see if it spots any problems in the watershed code. Same for the "undefined behavior" sanitizer. |
The segfault occurred on centos 7 (64 bit) with GCC 4.8.5. |
At the moment, we build our vigra package with the
-O2
flag instead of the-O3
flag. That's because there was at least one function that gcc would miscompile at the-O3
setting, triggering segfaults and/or other spurious behavior. Nowadays, the vigra source has changed, and so has the version of gcc we use, so it's worth giving-O3
a try.While we're at it, it would be nice to see if there is a performance improvement when switching from
-O2
to-O3
...The text was updated successfully, but these errors were encountered: