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
Use -Og for debug builds #67633
Comments
Recent gcc versions have an optimization level named "-Og". It enables all optimizations that do not break debugging. Here is a patch that uses it on debug builds. Without the patch I get the following time for the whole test suite: $ time ./python -m test -j12
[...]
real 3m51.670s
user 11m53.039s
sys 0m28.300s With the patch it goes down to: real 2m36.378s So the test suite is 33% faster to pass. |
Most slow tests are skipped without -uall. As for the patch, may be use AX_CHECK_COMPILE_FLAG [1]? [1] http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html |
-uall, without patch: real 5m47.290s -uall, with patch: real 3m35.132s That's a 38% speedup. |
It's not used elsewhere in configure.ac. I reused the idiom used a couple lines above. |
This looks pretty harmless. Some slow buildbots run tests very long time and failed with timeout after 3600 seconds. May be this patch will make them faster. Yet one advantage -- the code compiled with partial optimization will be closer to the code compiled with full optimization. Therefore debugging version could catch more bugs that exist only with optimization. But may be apply this only to 3.5? |
I'd like to apply it to 3.4 as well, because it makes development more pleasant. |
New changeset e37b201297d2 by Antoine Pitrou in branch '3.4': New changeset 527ed5205806 by Antoine Pitrou in branch 'default': |
Done. It shouldn't break anything. |
New changeset c663dbb84c8c by Victor Stinner in branch '3.4': New changeset 5b5a22b9327b by Victor Stinner in branch '2.7': |
You're change skipped some test_gdb tests. I fixed the check in test_gdb/test.support. |
I created bpo-38350 to propose to revert this change. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: