Title: use -flto=thin for clang-cl on Windows · Issue #131035 · python/cpython · GitHub
Open Graph Title: use -flto=thin for clang-cl on Windows · Issue #131035 · python/cpython
X Title: use -flto=thin for clang-cl on Windows · Issue #131035 · python/cpython
Description: This started off as a build time analysis (#130090 (comment)), but since I now have the infrastructure, I tried -flto=thin, too: faster in building 520.6 vs 651.2 seconds is neutral on the pyperformance benchmarks would bring us in sync ...
Open Graph Description: This started off as a build time analysis (#130090 (comment)), but since I now have the infrastructure, I tried -flto=thin, too: faster in building 520.6 vs 651.2 seconds is neutral on the pyperfor...
X Description: This started off as a build time analysis (#130090 (comment)), but since I now have the infrastructure, I tried -flto=thin, too: faster in building 520.6 vs 651.2 seconds is neutral on the pyperfor...
Opengraph URL: https://github.com/python/cpython/issues/131035
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"use -flto=thin for clang-cl on Windows","articleBody":"This started off as a build time analysis (https://github.com/python/cpython/issues/130090#issuecomment-2709951815), but since I now have the infrastructure, I tried `-flto=thin`, too:\n\n- faster in building 520.6 vs 651.2 seconds\n- is neutral on the pyperformance benchmarks\n- would bring us in sync with Linux, because there `CONFIGURE_CFLAGS_NODIST` and `CONFIGURE_LDFLAGS_NOLTO` both use `-flto=thin` when I configure for clang in WSL Ubuntu-24.04. See also the discussion why not to use full `-flto` in https://github.com/python/cpython/issues/130048\n\n| Benchmark | clang.pgo.20.1.0-rc2 | clang.pgo.thin.20.1.0-rc2 |\n|---------------------------------|:--------------------:|:-------------------------:|\n| Geometric mean | (ref) | 1.00x faster |\n\n\u003cdetails>\u003csummary>Detailed pybenchmark results\u003c/summary>\n\u003cp>\n\n| Benchmark | clang.pgo.20.1.0-rc2 | clang.pgo.thin.20.1.0-rc2 |\n|---------------------------------|:--------------------:|:-------------------------:|\n| float | 95.0 ms | 89.7 ms: 1.06x faster |\n| json_loads | 29.8 us | 28.6 us: 1.04x faster |\n| mdp | 2.86 sec | 2.77 sec: 1.03x faster |\n| html5lib | 68.3 ms | 66.2 ms: 1.03x faster |\n| async_tree_none_tg | 330 ms | 320 ms: 1.03x faster |\n| pyflate | 518 ms | 505 ms: 1.03x faster |\n| sqlite_synth | 3.21 us | 3.13 us: 1.03x faster |\n| pidigits | 228 ms | 223 ms: 1.02x faster |\n| bench_mp_pool | 168 ms | 165 ms: 1.02x faster |\n| async_tree_eager_io | 742 ms | 727 ms: 1.02x faster |\n| generators | 34.5 ms | 33.8 ms: 1.02x faster |\n| comprehensions | 18.3 us | 17.9 us: 1.02x faster |\n| async_tree_cpu_io_mixed | 641 ms | 629 ms: 1.02x faster |\n| scimark_sparse_mat_mult | 4.51 ms | 4.43 ms: 1.02x faster |\n| async_tree_memoization | 425 ms | 417 ms: 1.02x faster |\n| sympy_expand | 538 ms | 529 ms: 1.02x faster |\n| unpack_sequence | 57.0 ns | 56.0 ns: 1.02x faster |\n| regex_dna | 209 ms | 205 ms: 1.02x faster |\n| async_generators | 465 ms | 458 ms: 1.02x faster |\n| scimark_sor | 140 ms | 137 ms: 1.02x faster |\n| sympy_str | 319 ms | 314 ms: 1.02x faster |\n| async_tree_io_tg | 751 ms | 740 ms: 1.01x faster |\n| regex_effbot | 3.14 ms | 3.10 ms: 1.01x faster |\n| async_tree_eager_tg | 272 ms | 268 ms: 1.01x faster |\n| pickle_dict | 27.3 us | 27.0 us: 1.01x faster |\n| async_tree_eager_memoization_tg | 363 ms | 359 ms: 1.01x faster |\n| sympy_integrate | 22.5 ms | 22.2 ms: 1.01x faster |\n| sympy_sum | 181 ms | 179 ms: 1.01x faster |\n| 2to3 | 390 ms | 386 ms: 1.01x faster |\n| hexiom | 6.68 ms | 6.61 ms: 1.01x faster |\n| docutils | 3.03 sec | 3.00 sec: 1.01x faster |\n| sqlglot_normalize | 121 ms | 120 ms: 1.01x faster |\n| async_tree_memoization_tg | 392 ms | 389 ms: 1.01x faster |\n| async_tree_cpu_io_mixed_tg | 614 ms | 609 ms: 1.01x faster |\n| tomli_loads | 2.20 sec | 2.18 sec: 1.01x faster |\n| spectral_norm | 102 ms | 101 ms: 1.01x faster |\n| python_startup_no_site | 34.4 ms | 34.2 ms: 1.01x faster |\n| genshi_text | 24.6 ms | 24.5 ms: 1.01x faster |\n| dulwich_log | 119 ms | 118 ms: 1.00x faster |\n| go | 128 ms | 128 ms: 1.00x faster |\n| deltablue | 3.62 ms | 3.63 ms: 1.00x slower |\n| unpickle_pure_python | 247 us | 248 us: 1.00x slower |\n| xml_etree_generate | 107 ms | 107 ms: 1.01x slower |\n| django_template | 39.2 ms | 39.4 ms: 1.01x slower |\n| coroutines | 24.8 ms | 25.0 ms: 1.01x slower |\n| mako | 13.3 ms | 13.5 ms: 1.01x slower |\n| unpickle | 15.9 us | 16.1 us: 1.01x slower |\n| nbody | 119 ms | 121 ms: 1.01x slower |\n| fannkuch | 465 ms | 472 ms: 1.01x slower |\n| crypto_pyaes | 81.3 ms | 82.6 ms: 1.02x slower |\n| json_dumps | 11.5 ms | 11.7 ms: 1.02x slower |\n| deepcopy | 285 us | 291 us: 1.02x slower |\n| pprint_safe_repr | 858 ms | 876 ms: 1.02x slower |\n| xml_etree_iterparse | 136 ms | 139 ms: 1.02x slower |\n| gc_traversal | 5.03 ms | 5.14 ms: 1.02x slower |\n| meteor_contest | 115 ms | 117 ms: 1.02x slower |\n| deepcopy_memo | 33.8 us | 34.7 us: 1.03x slower |\n| richards_super | 51.1 ms | 52.6 ms: 1.03x slower |\n| scimark_fft | 327 ms | 337 ms: 1.03x slower |\n| richards | 44.9 ms | 46.3 ms: 1.03x slower |\n| pickle_list | 4.83 us | 4.99 us: 1.03x slower |\n| deepcopy_reduce | 2.93 us | 3.03 us: 1.03x slower |\n| pprint_pformat | 1.74 sec | 1.80 sec: 1.03x slower |\n| logging_simple | 10.9 us | 11.4 us: 1.05x slower |\n| logging_format | 12.1 us | 12.6 us: 1.05x slower |\n| xml_etree_parse | 197 ms | 208 ms: 1.05x slower |\n| Geometric mean | (ref) | 1.00x faster |\n\n\n\u003c/p>\n\u003c/details> \n\n| | pgo_clang_20.1.0-rc2 | pgo_clang_thin_20.1.0-rc2 |\n|------------|:--------------------:|:-------------------------:|\n| pginstr | 297.2 | 219.3 |\n| pgo | 70.0 | 69.0 |\n| kill | 1.2 | 0.5 |\n| pgupd | 282.8 | 231.7 |\n| total time | 651.2 | 520.6 |\n\n\n\n\u003cdetails>\u003csummary>Details pginstrument\u003c/summary>\n\u003cp>\n\n| | pgo_clang_20.1.0-rc2 | pgo_clang_thin_20.1.0-rc2 |\n|---------------------|:--------------------:|:-------------------------:|\n| _freeze_module | 38.5 | 40.0 |\n| python314 | 141.5 | 81.3 |\n| pyexpat | 52.7 | 3.9 |\n| _elementtree | 51.8 | 5.3 |\n| sqlite3 | 46.0 | 42.4 |\n| liblzma | 18.2 | 16.5 |\n| _decimal | 12.4 | 7.7 |\n| _testcapi | 8.3 | 7.1 |\n| _bz2 | 7.0 | 4.9 |\n| _ctypes | 6.9 | 7.5 |\n| _testlimitedcapi | 4.9 | 4.3 |\n| _wmi | 4.5 | 3.0 |\n| _overlapped | 4.5 | 3.2 |\n| _asyncio | 4.0 | 5.2 |\n| _lzma | 3.8 | 1.8 |\n| _ssl | 3.7 | 5.5 |\n| _ctypes_test | 3.7 | 3.4 |\n| _multiprocessing | 3.5 | 2.7 |\n| _sqlite3 | 3.4 | 2.8 |\n| venvwlauncher | 3.3 | 2.7 |\n| _zoneinfo | 3.1 | 3.4 |\n| unicodedata | 2.7 | 3.0 |\n| pyshellext | 2.7 | 2.6 |\n| pyw | 2.7 | 2.7 |\n| py | 2.6 | 2.5 |\n| _socket | 2.4 | 3.7 |\n| _testinternalcapi | 2.4 | 2.2 |\n| _tkinter | 2.2 | 4.1 |\n| _testclinic | 2.0 | 1.9 |\n| _hashlib | 1.8 | 3.1 |\n| select | 1.8 | 2.2 |\n| venvlauncher | 1.8 | 1.7 |\n| winsound | 1.7 | 3.3 |\n| _uuid | 1.6 | 3.2 |\n| _queue | 1.6 | 2.3 |\n| _testembed | 1.5 | 1.5 |\n| _testbuffer | 1.4 | 1.3 |\n| pythonw | 1.1 | 1.1 |\n| _testconsole | 1.1 | 1.1 |\n| _testmultiphase | 1.0 | 1.0 |\n| _testsinglephase | 1.0 | 1.0 |\n| python | 1.0 | 0.9 |\n| _testclinic_limited | 0.9 | 0.9 |\n| _testimportmultiple | 0.9 | 0.9 |\n| python3 | 0.5 | 0.5 |\n| total | 465.8 | 303.3 |\n\n\u003c/p>\n\u003c/details> \n\n\u003cdetails>\u003csummary>Details pgupdate\u003c/summary>\n\u003cp>\n\n| | pgo_clang_20.1.0-rc2 | pgo_clang_thin_20.1.0-rc2 |\n|---------------------|:--------------------:|:-------------------------:|\n| _freeze_module | 38.0 | 39.5 |\n| python314 | 141.9 | 95.4 |\n| sqlite3 | 44.4 | 42.9 |\n| liblzma | 17.3 | 16.5 |\n| _decimal | 11.2 | 8.7 |\n| _testcapi | 8.6 | 7.3 |\n| _ctypes | 8.0 | 7.2 |\n| _bz2 | 7.8 | 5.5 |\n| _ssl | 5.2 | 5.6 |\n| _testlimitedcapi | 5.0 | 4.2 |\n| pyexpat | 4.6 | 3.6 |\n| _asyncio | 4.5 | 4.6 |\n| _socket | 4.3 | 3.5 |\n| _tkinter | 4.0 | 4.2 |\n| _ctypes_test | 3.7 | 3.4 |\n| _overlapped | 3.5 | 3.7 |\n| _elementtree | 3.5 | 4.5 |\n| _wmi | 3.5 | 3.1 |\n| _zoneinfo | 3.2 | 3.2 |\n| _lzma | 3.2 | 1.9 |\n| unicodedata | 3.2 | 3.0 |\n| _sqlite3 | 3.1 | 2.7 |\n| _hashlib | 3.1 | 3.3 |\n| venvwlauncher | 3.1 | 3.0 |\n| _multiprocessing | 2.8 | 2.6 |\n| pyshellext | 2.7 | 2.6 |\n| pyw | 2.6 | 2.6 |\n| _uuid | 2.6 | 2.8 |\n| py | 2.6 | 2.7 |\n| _testinternalcapi | 2.4 | 2.2 |\n| _testclinic | 2.0 | 1.9 |\n| _queue | 1.9 | 2.2 |\n| winsound | 1.8 | 3.0 |\n| venvlauncher | 1.7 | 1.5 |\n| select | 1.6 | 2.0 |\n| _testembed | 1.5 | 1.4 |\n| _testbuffer | 1.4 | 1.3 |\n| _testconsole | 1.1 | 1.0 |\n| pythonw | 1.1 | 1.1 |\n| _testmultiphase | 1.0 | 1.1 |\n| _testsinglephase | 1.0 | 1.0 |\n| python | 1.0 | 0.9 |\n| _testclinic_limited | 0.9 | 0.9 |\n| _testimportmultiple | 0.9 | 0.9 |\n| python3 | 0.5 | 0.5 |\n| total | 372.9 | 316.8 |\n\n\u003c/p>\n\u003c/details> \n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-131036\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/chris-eibl","@type":"Person","name":"chris-eibl"},"datePublished":"2025-03-10T09:44:52Z","url":"https://github.com/python/cpython/issues/131035"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:1e26e320-65ab-f269-855f-29a6cc29be28 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B356:928E2:34107CA:4567594:6B01FE12 |
| html-safe-nonce | cb8072cfeb26240a206999e3a0beb528e23796928aa2c6d8a6a0a675af3c690c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMzU2OjkyOEUyOjM0MTA3Q0E6NDU2NzU5NDo2QjAxRkUxMiIsInZpc2l0b3JfaWQiOiIzMzk2ODQ0OTcyODM2NzgxNTg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8145f9caf3a96101233f781033192601c6dcc97df7e753c97a06d8658ba8fcf3 |
| hovercard-subject-tag | issue:2906658930 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/131035/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3c489d74a34e132a841815bc2b16d19587b171cae28f6447f2d05e93a6327695/python/cpython/issues/131035 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3c489d74a34e132a841815bc2b16d19587b171cae28f6447f2d05e93a6327695/python/cpython/issues/131035 |
| og:image:alt | This started off as a build time analysis (#130090 (comment)), but since I now have the infrastructure, I tried -flto=thin, too: faster in building 520.6 vs 651.2 seconds is neutral on the pyperfor... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | chris-eibl |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width