
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2015-02-11 16:28 bypitrou, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| og.patch | pitrou,2015-02-11 16:28 | review | ||
| Messages (11) | |||
|---|---|---|---|
| msg235754 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2015-02-11 16:28 | |
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[...]real3m51.670suser11m53.039ssys0m28.300sWith the patch it goes down to:real2m36.378suser7m13.743ssys0m29.728sSo the test suite is 33% faster to pass. | |||
| msg235755 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2015-02-11 16:44 | |
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 | |||
| msg235756 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2015-02-11 17:10 | |
-uall, without patch:real5m47.290suser18m28.405ssys0m29.493s-uall, with patch:real3m35.132suser10m26.345ssys0m30.351sThat's a 38% speedup. | |||
| msg235757 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2015-02-11 17:11 | |
> As for the patch, may be use AX_CHECK_COMPILE_FLAG [1]?It's not used elsewhere in configure.ac. I reused the idiom used a couple lines above. | |||
| msg235759 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2015-02-11 18:00 | |
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? | |||
| msg235760 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2015-02-11 18:03 | |
I'd like to apply it to 3.4 as well, because it makes development more pleasant. | |||
| msg235763 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2015-02-11 18:41 | |
New changesete37b201297d2 by Antoine Pitrou in branch '3.4':Issue#23445: pydebug builds now use "gcc -Og" where possible, to make the resulting executable faster.https://hg.python.org/cpython/rev/e37b201297d2New changeset527ed5205806 by Antoine Pitrou in branch 'default':Issue#23445: pydebug builds now use "gcc -Og" where possible, to make the resulting executable faster.https://hg.python.org/cpython/rev/527ed5205806 | |||
| msg235764 -(view) | Author: Antoine Pitrou (pitrou)*![]() | Date: 2015-02-11 18:41 | |
Done. It shouldn't break anything. | |||
| msg239406 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2015-03-27 14:44 | |
New changesetc663dbb84c8c by Victor Stinner in branch '3.4':Issue#23445: Fix test.support.python_is_optimized() for CFLAGS=-Oghttps://hg.python.org/cpython/rev/c663dbb84c8cNew changeset5b5a22b9327b by Victor Stinner in branch '2.7':Issue#23445: Fix test_gdb.python_is_optimized() for CFLAGS=-Oghttps://hg.python.org/cpython/rev/5b5a22b9327b | |||
| msg239407 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2015-03-27 14:48 | |
> Done. It shouldn't break anything.You're change skipped some test_gdb tests. I fixed the check in test_gdb/test.support. | |||
| msg353754 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2019-10-02 16:57 | |
I createdbpo-38350 to propose to revert this change. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:12 | admin | set | github: 67633 |
| 2019-10-02 16:57:46 | vstinner | set | messages: +msg353754 |
| 2015-03-27 14:48:51 | vstinner | set | nosy: +vstinner messages: +msg239407 |
| 2015-03-27 14:44:55 | python-dev | set | messages: +msg239406 |
| 2015-02-11 18:41:42 | pitrou | set | status: open -> closed resolution: fixed messages: +msg235764 stage: patch review -> resolved |
| 2015-02-11 18:41:20 | python-dev | set | nosy: +python-dev messages: +msg235763 |
| 2015-02-11 18:03:00 | pitrou | set | messages: +msg235760 |
| 2015-02-11 18:00:01 | serhiy.storchaka | set | messages: +msg235759 |
| 2015-02-11 17:11:02 | pitrou | set | messages: +msg235757 |
| 2015-02-11 17:10:31 | pitrou | set | messages: +msg235756 |
| 2015-02-11 16:44:09 | serhiy.storchaka | set | nosy: +serhiy.storchaka messages: +msg235755 |
| 2015-02-11 16:28:42 | pitrou | create | |