René's URL Explorer Experiment


Title: gh-135336: Add fast path to json string encoding by nineteendo · Pull Request #133239 · python/cpython · GitHub

Open Graph Title: gh-135336: Add fast path to json string encoding by nineteendo · Pull Request #133239 · python/cpython

X Title: gh-135336: Add fast path to json string encoding by nineteendo · Pull Request #133239 · python/cpython

Description: pyperformance (with --enable-optimizations and --with-lto) main.json ========= Performance version: 1.11.0 Python version: 3.15.0a0 (64-bit) revision c600310663 Report on macOS-13.7.6-x86_64-i386-64bit-Mach-O Number of logical CPUs: 8 Start date: 2025-06-12 08:26:22.632424 End date: 2025-06-12 08:26:59.100296 feature.json ============ Performance version: 1.11.0 Python version: 3.15.0a0 (64-bit) revision 660d962602 Report on macOS-13.7.6-x86_64-i386-64bit-Mach-O Number of logical CPUs: 8 Start date: 2025-06-12 08:27:40.576627 End date: 2025-06-12 08:28:11.517308 ### json_dumps ### Mean +- std dev: 12.2 ms +- 0.2 ms -> 10.0 ms +- 0.2 ms: 1.22x faster Significant (t=88.87) jsonyx-performance-tests (with --enable-optimizations and --with-lto) encode main feature difference Dict with 65,536 booleans 8735.25 μs 5793.46 μs 1.50x faster List of 65,536 empty strings 3424.57 μs 1654.34 μs 2.07x faster List of 65,536 ASCII strings 12975.45 μs 5896.28 μs 2.20x faster List of 65,536 strings 85195.07 μs 85930.24 μs 1.01x slower Issue: gh-135336

Open Graph Description: pyperformance (with --enable-optimizations and --with-lto) main.json ========= Performance version: 1.11.0 Python version: 3.15.0a0 (64-bit) revision c600310663 Report on macOS-13.7.6-x86_64-i386-...

X Description: pyperformance (with --enable-optimizations and --with-lto) main.json ========= Performance version: 1.11.0 Python version: 3.15.0a0 (64-bit) revision c600310663 Report on macOS-13.7.6-x86_64-i386-...

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

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:3e2df33b-bf27-6c39-5fe8-e0d7fc0b65ec
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB8F2:2E9D3B:2D7AA2:391C2B:6B0207CB
html-safe-nonce348e58cf229b72703b93439dcee6a97611f24ab7e3f20503ece4298ae589a674
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOEYyOjJFOUQzQjoyRDdBQTI6MzkxQzJCOjZCMDIwN0NCIiwidmlzaXRvcl9pZCI6IjQ5NDc3MzU1MjI4NjU5NzMxOTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacb27b72a7d9376bd929af1c023a12723243c5670633702fa62feec314ce2f71e3
hovercard-subject-tagpull_request:2493271752
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/133239/files
twitter:imagehttps://avatars.githubusercontent.com/u/65588599?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/65588599?s=400&v=4
og:image:altpyperformance (with --enable-optimizations and --with-lto) main.json ========= Performance version: 1.11.0 Python version: 3.15.0a0 (64-bit) revision c600310663 Report on macOS-13.7.6-x86_64-i386-...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/133239/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F133239%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F133239%2Ffiles
Sign uphttps://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/133239/files
Reloadhttps://github.com/python/cpython/pull/133239/files
Reloadhttps://github.com/python/cpython/pull/133239/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
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
vstinnerhttps://github.com/vstinner
python:mainhttps://github.com/python/cpython/tree/main
nineteendo:speedup-json-encodehttps://github.com/nineteendo/cpython/tree/speedup-json-encode
Conversation 34 https://github.com/python/cpython/pull/133239
Commits 13 https://github.com/python/cpython/pull/133239/commits
Checks 0 https://github.com/python/cpython/pull/133239/checks
Files changed https://github.com/python/cpython/pull/133239/files
Please reload this pagehttps://github.com/python/cpython/pull/133239/files
gh-135336: Add fast path to json string encoding https://github.com/python/cpython/pull/133239/files#top
Show all changes 13 commits https://github.com/python/cpython/pull/133239/files
930e938 Fast path for string encoding nineteendo May 1, 2025 https://github.com/python/cpython/pull/133239/commits/930e93813c2adfdf111b5789b82fd5615ef24a2f
32eefb3 Merge branch 'main' into speedup-json-encode nineteendo May 13, 2025 https://github.com/python/cpython/pull/133239/commits/32eefb3ef21bdf56d605b5168f0529c6bc5397a6
078965b Merge branch 'main' into speedup-json-encode nineteendo May 30, 2025 https://github.com/python/cpython/pull/133239/commits/078965b55f7652fb4831ef5a9d7defbbeacd5395
83499a4 Improve slow path nineteendo May 30, 2025 https://github.com/python/cpython/pull/133239/commits/83499a49a0e268e53b582985afd46adb901b701c
25da453 Reduce diff nineteendo May 30, 2025 https://github.com/python/cpython/pull/133239/commits/25da453860aa5341ed417ea6b7a5c52dd85a9bc7
b4a8026 Reduce diff nineteendo Jun 10, 2025 https://github.com/python/cpython/pull/133239/commits/b4a802674bb4ae892109c6ec3af728f6938f81a5
8ee4c93 Reuse code nineteendo Jun 10, 2025 https://github.com/python/cpython/pull/133239/commits/8ee4c93abcced6b8fdf248b5492ba2c483d6b2b0
7b055be Fix compiler warnings nineteendo Jun 10, 2025 https://github.com/python/cpython/pull/133239/commits/7b055be5488f747416762dc2ce8cb7b76df5f1ec
660d962 📜🤖 Added by blurb_it. blurb-it[bot] Jun 11, 2025 https://github.com/python/cpython/pull/133239/commits/660d962602ecd4e5cc34cfe2aeb1f9af021187cc
19f252a Improve fast path nineteendo Jun 12, 2025 https://github.com/python/cpython/pull/133239/commits/19f252a80e20240bd6915c2b8183c4567dc171a1
c4feeb9 Merge branch 'main' into speedup-json-encode serhiy-storchaka Jul 28, 2025 https://github.com/python/cpython/pull/133239/commits/c4feeb9e8d75965f57c3bc39286f70649d37e673
b12d42d Address review nineteendo Jul 28, 2025 https://github.com/python/cpython/pull/133239/commits/b12d42d53a599acaf81946af950449169939bba0
1a035c9 Apply suggestions from code review vstinner Aug 7, 2025 https://github.com/python/cpython/pull/133239/commits/1a035c9ea6ce83c70b6908f6c0dce58763f100d8
Clear filters https://github.com/python/cpython/pull/133239/files
Please reload this pagehttps://github.com/python/cpython/pull/133239/files
Please reload this pagehttps://github.com/python/cpython/pull/133239/files
2025-06-11-15-08-02.gh-issue-135336.6Gq6MI.rst https://github.com/python/cpython/pull/133239/files#diff-9c906c97a8b71f8542f7d0ce074eff3027325566fb69932f01a4c83753849d99
_json.c https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
Misc/NEWS.d/next/Library/2025-06-11-15-08-02.gh-issue-135336.6Gq6MI.rsthttps://github.com/python/cpython/pull/133239/files#diff-9c906c97a8b71f8542f7d0ce074eff3027325566fb69932f01a4c83753849d99
View file https://github.com/nineteendo/cpython/blob/1a035c9ea6ce83c70b6908f6c0dce58763f100d8/Misc/NEWS.d/next/Library/2025-06-11-15-08-02.gh-issue-135336.6Gq6MI.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/133239/{{ revealButtonHref }}
Modules/_json.chttps://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
View file https://github.com/nineteendo/cpython/blob/1a035c9ea6ce83c70b6908f6c0dce58763f100d8/Modules/_json.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/133239/{{ revealButtonHref }}
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
https://github.com/python/cpython/pull/133239/files#diff-efe183ae0b85e5b8d9bbbc588452dd4de80b39fd5c5174ee499ba554217a39ed
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.