René's URL Explorer Experiment


Title: gh-90536: Add support for the BOLT post-link binary optimizer by kmod · Pull Request #95908 · python/cpython · GitHub

Open Graph Title: gh-90536: Add support for the BOLT post-link binary optimizer by kmod · Pull Request #95908 · python/cpython

X Title: gh-90536: Add support for the BOLT post-link binary optimizer by kmod · Pull Request #95908 · python/cpython

Description: Using bolt provides a fairly large speedup without any code or functionality changes. It provides roughly a 1% speedup on pyperformance, and a 4% improvement on the Pyston web macrobenchmarks. It is gated behind an --enable-bolt configure arg because not all toolchains and environments are supported. It has been tested on a Linux x86_64 toolchain, using llvm-bolt built from the LLVM 14.0.6 sources (their binary distribution of this version did not include bolt). Compared to a previous attempt, this commit uses bolt's preferred "instrumentation" approach, as well as adds some non-PIE flags which enable much better optimizations from bolt. The effects of this change are a bit more dependent on CPU microarchitecture than other changes, since it optimizes i-cache behavior which seems to be a bit more variable between architectures. The 1%/4% numbers were collected on an Intel Skylake CPU, and on an AMD Zen 3 CPU I got a slightly larger speedup (2%/4%), and on a c6i.xlarge EC2 instance I got a slightly lower speedup (1%/3%). The low speedup on pyperformance is not entirely unexpected, because BOLT improves i-cache behavior, and the benchmarks in the pyperformance suite are small and tend to fit in i-cache. This change uses the existing pgo profiling task (python -m test --pgo), though I was able to measure about a 1% macrobenchmark improvement by using the macrobenchmarks as the training task. I personally think that both the PGO and BOLT tasks should be updated to use macrobenchmarks, but for the sake of splitting up the work this PR uses the existing pgo task. Issue: gh-90536

Open Graph Description: Using bolt provides a fairly large speedup without any code or functionality changes. It provides roughly a 1% speedup on pyperformance, and a 4% improvement on the Pyston web macrobenchmarks. It i...

X Description: Using bolt provides a fairly large speedup without any code or functionality changes. It provides roughly a 1% speedup on pyperformance, and a 4% improvement on the Pyston web macrobenchmarks. It i...

Opengraph URL: https://github.com/python/cpython/pull/95908

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:1e8b246d-2857-a1b5-acec-e791ca9ac8d9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCE1C:144C84:10DE1E7:179A05A:696A379E
html-safe-nonce451b3e91d503cba00d5b305ea7575bd9f2dbba72d8fdbd8e7266211fd5bcd4d6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTFDOjE0NEM4NDoxMERFMUU3OjE3OUEwNUE6Njk2QTM3OUUiLCJ2aXNpdG9yX2lkIjoiNTI1NDQxOTU2OTU3NTYwNjE3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac330ef905ff43ad3a0e23afc966ba60f8798de5bc774cc69cd115c6be3fa36762
hovercard-subject-tagpull_request:1024368986
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/95908/files
twitter:imagehttps://avatars.githubusercontent.com/u/271916?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/271916?s=400&v=4
og:image:altUsing bolt provides a fairly large speedup without any code or functionality changes. It provides roughly a 1% speedup on pyperformance, and a 4% improvement on the Pyston web macrobenchmarks. It i...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release13581a31d51edf4a3aca179e10890a4d4f9b6d76
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/95908/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F95908%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F95908%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/95908/files
Reloadhttps://github.com/python/cpython/pull/95908/files
Reloadhttps://github.com/python/cpython/pull/95908/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/95908/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/95908/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
corona10https://github.com/corona10
python:mainhttps://github.com/python/cpython/tree/main
kmod:bolt4https://github.com/kmod/cpython/tree/bolt4
Conversation 40 https://github.com/python/cpython/pull/95908
Commits 11 https://github.com/python/cpython/pull/95908/commits
Checks 0 https://github.com/python/cpython/pull/95908/checks
Files changed https://github.com/python/cpython/pull/95908/files
Please reload this pagehttps://github.com/python/cpython/pull/95908/files
gh-90536: Add support for the BOLT post-link binary optimizer https://github.com/python/cpython/pull/95908/files#top
Show all changes 11 commits https://github.com/python/cpython/pull/95908/files
ef8e98d Add support for the BOLT post-link binary optimizer kmod Aug 10, 2022 https://github.com/python/cpython/pull/95908/commits/ef8e98d08ad70fb3b982ea5d38aa0df65a2013c4
1448a68 Simplify the build flags kmod Aug 12, 2022 https://github.com/python/cpython/pull/95908/commits/1448a68bc6884b084d568067ff3936231ff52733
c546374 Add a NEWS entry kmod Aug 12, 2022 https://github.com/python/cpython/pull/95908/commits/c5463743e5b7f6661d44b9ec5795a9977d2dff94
c12dbea Update Makefile.pre.in kmod Aug 16, 2022 https://github.com/python/cpython/pull/95908/commits/c12dbea53581a595c49d94712cce0500b2c3759d
ce25757 Update configure.ac kmod Aug 16, 2022 https://github.com/python/cpython/pull/95908/commits/ce25757e6e990941cffda4d156f17240a58aac6a
ded38f0 Add myself to ACKS kmod Aug 16, 2022 https://github.com/python/cpython/pull/95908/commits/ded38f0e57f760c37778ec141bf5f11c3e2b3bbd
cc17806 Add docs kmod Aug 16, 2022 https://github.com/python/cpython/pull/95908/commits/cc17806259eed5efb77d4c4d7808302cb1f399af
0050190 Other review comments kmod Aug 16, 2022 https://github.com/python/cpython/pull/95908/commits/0050190807789c7786f817da4eb04697fbb55f5c
83da8c4 fix tab/space issue kmod Aug 16, 2022 https://github.com/python/cpython/pull/95908/commits/83da8c4d5ed01c4f32e72ee22d36de1d1eddf13f
7f14cd1 Make it more clear that --enable-bolt is experimental kmod Aug 17, 2022 https://github.com/python/cpython/pull/95908/commits/7f14cd18f7d4d693c16852d2bf4fa0c096f3131c
f0f5e53 Add link to bolt's github page kmod Aug 18, 2022 https://github.com/python/cpython/pull/95908/commits/f0f5e5345c14b846d77378949e43a4d8cacdff14
Clear filters https://github.com/python/cpython/pull/95908/files
Please reload this pagehttps://github.com/python/cpython/pull/95908/files
Please reload this pagehttps://github.com/python/cpython/pull/95908/files
configure.rst https://github.com/python/cpython/pull/95908/files#diff-3d679da2b3a01e3744dc65d731bb0a896c07e60f3cfdb19911afab3c146a80ef
3.12.rst https://github.com/python/cpython/pull/95908/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
Makefile.pre.in https://github.com/python/cpython/pull/95908/files#diff-1f0a8db227d22005511b0d90f5339b97db345917b863954b3b3ccb9ec308767c
ACKS https://github.com/python/cpython/pull/95908/files#diff-d1243956feb505c5459fc05387e194609efb5c350cee202942be47ed30d7d7d0
2022-08-12-13-06-03.gh-issue-90536.qMpF6p.rst https://github.com/python/cpython/pull/95908/files#diff-4e02b4808f748bbec1636f3bc0b8032ea6ae12896c13dc3c4691929447bbabf7
configure https://github.com/python/cpython/pull/95908/files#diff-90d08e583c4c9c6f391b2ae90f819f600a6326928ea9512c9e0c6d98e9f29ac2
configure.ac https://github.com/python/cpython/pull/95908/files#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L83
Doc/using/configure.rsthttps://github.com/python/cpython/pull/95908/files#diff-3d679da2b3a01e3744dc65d731bb0a896c07e60f3cfdb19911afab3c146a80ef
View file https://github.com/kmod/cpython/blob/f0f5e5345c14b846d77378949e43a4d8cacdff14/Doc/using/configure.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/95908/{{ revealButtonHref }}
https://github.com/python/cpython/pull/95908/files#diff-3d679da2b3a01e3744dc65d731bb0a896c07e60f3cfdb19911afab3c146a80ef
https://github.com/python/cpython/pull/95908/files#diff-3d679da2b3a01e3744dc65d731bb0a896c07e60f3cfdb19911afab3c146a80ef
https://github.com/python/cpython/pull/95908/files#diff-3d679da2b3a01e3744dc65d731bb0a896c07e60f3cfdb19911afab3c146a80ef
https://github.com/python/cpython/pull/95908/files#diff-3d679da2b3a01e3744dc65d731bb0a896c07e60f3cfdb19911afab3c146a80ef
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L114
Doc/whatsnew/3.12.rsthttps://github.com/python/cpython/pull/95908/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
View file https://github.com/kmod/cpython/blob/f0f5e5345c14b846d77378949e43a4d8cacdff14/Doc/whatsnew/3.12.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/95908/{{ revealButtonHref }}
https://github.com/python/cpython/pull/95908/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
https://github.com/python/cpython/pull/95908/files#diff-0f2c1763c64530268325a0ee2dfaa4f5d555c4ac27deb78bd77102c8ce1b886b
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L84
Makefile.pre.inhttps://github.com/python/cpython/pull/95908/files#diff-1f0a8db227d22005511b0d90f5339b97db345917b863954b3b3ccb9ec308767c
View file https://github.com/kmod/cpython/blob/f0f5e5345c14b846d77378949e43a4d8cacdff14/Makefile.pre.in
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/95908/{{ revealButtonHref }}
https://github.com/python/cpython/pull/95908/files#diff-1f0a8db227d22005511b0d90f5339b97db345917b863954b3b3ccb9ec308767c
Please reload this pagehttps://github.com/python/cpython/pull/95908/files
https://github.com/python/cpython/pull/95908/files#diff-1f0a8db227d22005511b0d90f5339b97db345917b863954b3b3ccb9ec308767c
Misc/ACKShttps://github.com/python/cpython/pull/95908/files#diff-d1243956feb505c5459fc05387e194609efb5c350cee202942be47ed30d7d7d0
View file https://github.com/kmod/cpython/blob/f0f5e5345c14b846d77378949e43a4d8cacdff14/Misc/ACKS
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/95908/{{ revealButtonHref }}
https://github.com/python/cpython/pull/95908/files#diff-d1243956feb505c5459fc05387e194609efb5c350cee202942be47ed30d7d7d0
https://github.com/python/cpython/pull/95908/files#diff-d1243956feb505c5459fc05387e194609efb5c350cee202942be47ed30d7d7d0
Misc/NEWS.d/next/Build/2022-08-12-13-06-03.gh-issue-90536.qMpF6p.rsthttps://github.com/python/cpython/pull/95908/files#diff-4e02b4808f748bbec1636f3bc0b8032ea6ae12896c13dc3c4691929447bbabf7
View file https://github.com/kmod/cpython/blob/f0f5e5345c14b846d77378949e43a4d8cacdff14/Misc/NEWS.d/next/Build/2022-08-12-13-06-03.gh-issue-90536.qMpF6p.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/95908/{{ revealButtonHref }}
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L83
configurehttps://github.com/python/cpython/pull/95908/files#diff-90d08e583c4c9c6f391b2ae90f819f600a6326928ea9512c9e0c6d98e9f29ac2
View file https://github.com/kmod/cpython/blob/f0f5e5345c14b846d77378949e43a4d8cacdff14/configure
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/95908/files
Please reload this pagehttps://github.com/python/cpython/pull/95908/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.