René's URL Explorer Experiment


Title: Using the public PyUnicodeWriter C API made the json module slower · Issue #133968 · python/cpython · GitHub

Open Graph Title: Using the public PyUnicodeWriter C API made the json module slower · Issue #133968 · python/cpython

X Title: Using the public PyUnicodeWriter C API made the json module slower · Issue #133968 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

X Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Using the public PyUnicodeWriter C API made the json module slower","articleBody":"I modified the json module to replace the private _PyUnicodeWriter C API with the public PyUnicodeWriter C API:\n\n* https://github.com/python/cpython/commit/6e63c4736beebdf912acd391fc437672ee9d362e\n* https://github.com/python/cpython/commit/c914212474792312bb125211bae5719650fe2f58\n\nProblem: it made the json module slower. Let's investigate what's going on.\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-133832\n* gh-133969\n* gh-133971\n* gh-133973\n* gh-134974\n* gh-135297\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2025-05-13T12:55:16Z","url":"https://github.com/python/cpython/issues/133968"}

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/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:dd30cbcc-0487-d7fc-1674-ecbe37b11a6d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE046:1F927B:14A7C6C:1B4514D:6B01F40E
html-safe-nonceace52cbf9bc8176c64a72423b186bba16990867ce62cac6f9f64eeff3544d1cc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDQ2OjFGOTI3QjoxNEE3QzZDOjFCNDUxNEQ6NkIwMUY0MEUiLCJ2aXNpdG9yX2lkIjoiNDE1MDczMDQwMzIzMTE2NzUwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac5bb95a8eac47e062ba83f3b5299867122a9eab7c8269e91cf040391975d7dd8f
hovercard-subject-tagrepository:81598961
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/issues/133968
twitter:imagehttps://opengraph.githubassets.com/e3420a3bc49a9718a8bd421754037addb985b6b3fb3bcbc9353241a022c85804/python/cpython
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e3420a3bc49a9718a8bd421754037addb985b6b3fb3bcbc9353241a022c85804/python/cpython
og:image:altThe Python programming language. Contribute to python/cpython development by creating an account on GitHub.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-cache
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
disable-turbofalse
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
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/133968#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F133968
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%2Fissues%2F133968
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/133968
Reloadhttps://github.com/python/cpython/issues/133968
Reloadhttps://github.com/python/cpython/issues/133968
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/133968
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/133968
Using the public PyUnicodeWriter C API made the json module slowerhttps://github.com/python/cpython/issues/133968#top
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
performancePerformance or resource usagehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22performance%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on May 13, 2025https://github.com/python/cpython/issues/133968#issue-3059984133
6e63c47https://github.com/python/cpython/commit/6e63c4736beebdf912acd391fc437672ee9d362e
c914212https://github.com/python/cpython/commit/c914212474792312bb125211bae5719650fe2f58
gh-133968: Use private unicode writer for json #133832https://github.com/python/cpython/pull/133832
gh-133968: Add fast path to PyUnicodeWriter_WriteStr() #133969https://github.com/python/cpython/pull/133969
[3.14] gh-133968: Add fast path to PyUnicodeWriter_WriteStr() (GH-133969) #133971https://github.com/python/cpython/pull/133971
gh-133968: Add PyUnicodeWriter_WriteASCII() function #133973https://github.com/python/cpython/pull/133973
[3.14] gh-133968: Add PyUnicodeWriter_WriteASCII() function (#133973) #134974https://github.com/python/cpython/pull/134974
gh-133968: Update PyUnicodeWriter_WriteASCII() documentation #135297https://github.com/python/cpython/pull/135297
Nexthttps://github.com/python/cpython/issues/133968?timeline_page=1
vstinnerhttps://github.com/vstinner
performancePerformance or resource usagehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22performance%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
on May 13, 2025https://github.com/python/cpython/issues/133968#event-17635081652
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on May 13, 2025https://github.com/python/cpython/issues/133968#issuecomment-2876403579
#133186https://github.com/python/cpython/pull/133186
vstinnerhttps://github.com/vstinner
on May 13, 2025https://github.com/python/cpython/issues/133968#event-17635115159
pythongh-133968: Add fast path to PyUnicodeWriter_WriteStr()https://github.com/vstinner/cpython/commit/861317084a6b392d2706027121f178d221ef5bf9
pythongh-133968https://github.com/python/cpython/issues/133968
8613170https://github.com/vstinner/cpython/commit/861317084a6b392d2706027121f178d221ef5bf9
gh-133968: Add fast path to PyUnicodeWriter_WriteStr() (#133969)https://github.com/python/cpython/commit/fe9f6e829a535747b1e06d9bfda033a9a47165ed
gh-133968https://github.com/python/cpython/issues/133968
#133969https://github.com/python/cpython/pull/133969
fe9f6e8https://github.com/python/cpython/commit/fe9f6e829a535747b1e06d9bfda033a9a47165ed
miss-islingtonhttps://github.com/miss-islington
on May 13, 2025https://github.com/python/cpython/issues/133968#event-17635775881
pythongh-133968: Add fast path to PyUnicodeWriter_WriteStr() (pythonG…https://github.com/miss-islington/cpython/commit/616ee6448930fc69aa29f0220e7c87978846a69a
pythongh-133968https://github.com/python/cpython/issues/133968
pythonG…https://github.com/python/cpython/pull/133969
616ee64https://github.com/miss-islington/cpython/commit/616ee6448930fc69aa29f0220e7c87978846a69a
vstinnerhttps://github.com/vstinner
on May 13, 2025https://github.com/python/cpython/issues/133968#event-17636279404
[3.14] gh-133968: Add fast path to PyUnicodeWriter_WriteStr() (GH-133969https://github.com/python/cpython/commit/5632e93f467564a1d09bd6d38caef6c4fa1f047f
gh-133968https://github.com/python/cpython/issues/133968
GH-133969https://github.com/python/cpython/pull/133969
5632e93https://github.com/python/cpython/commit/5632e93f467564a1d09bd6d38caef6c4fa1f047f
pythongh-133968: Add PyUnicodeWriter_WriteASCII() functionhttps://github.com/vstinner/cpython/commit/fa9d9df7ef9d773d2d51703a5d5840d68e51fd17
pythongh-133968https://github.com/python/cpython/issues/133968
fa9d9dfhttps://github.com/vstinner/cpython/commit/fa9d9df7ef9d773d2d51703a5d5840d68e51fd17
pythongh-133968: Add PyUnicodeWriter_WriteASCII() functionhttps://github.com/vstinner/cpython/commit/2aa2e87c0b1f6e351a6533140e501b66c3459643
pythongh-133968https://github.com/python/cpython/issues/133968
2aa2e87https://github.com/vstinner/cpython/commit/2aa2e87c0b1f6e351a6533140e501b66c3459643
https://github.com/encukou
encukouhttps://github.com/encukou
on May 15, 2025https://github.com/python/cpython/issues/133968#issuecomment-2883032239
picnixzhttps://github.com/picnixz
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
on May 15, 2025https://github.com/python/cpython/issues/133968#event-17672335027
picnixzhttps://github.com/picnixz
JSON issueshttps://github.com/orgs/python/projects/6
on May 15, 2025https://github.com/python/cpython/issues/133968#event-17672337383
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on May 15, 2025https://github.com/python/cpython/issues/133968#issuecomment-2884261201
https://github.com/encukou
encukouhttps://github.com/encukou
on May 17, 2025https://github.com/python/cpython/issues/133968#issuecomment-2888488105
vstinnerhttps://github.com/vstinner
on Jun 9, 2025https://github.com/python/cpython/issues/133968#event-18055039624
gh-133968: Update PyUnicodeWriter_WriteASCII() documentation (#135297)https://github.com/python/cpython/commit/aaad2e81cecae01d3e7e12b2bbd2e1a8533ff5d4
gh-133968https://github.com/python/cpython/issues/133968
#135297https://github.com/python/cpython/pull/135297
aaad2e8https://github.com/python/cpython/commit/aaad2e81cecae01d3e7e12b2bbd2e1a8533ff5d4
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Jun 9, 2025https://github.com/python/cpython/issues/133968#issuecomment-2955702641
vstinnerhttps://github.com/vstinner
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 9, 2025https://github.com/python/cpython/issues/133968#event-18055091222
github-project-automationhttps://github.com/apps/github-project-automation
JSON issueshttps://github.com/orgs/python/projects/6
on Jun 9, 2025https://github.com/python/cpython/issues/133968
lkollarhttps://github.com/lkollar
on Jun 19, 2025https://github.com/python/cpython/issues/133968#event-18236447777
pythongh-133968: Update PyUnicodeWriter_WriteASCII() documentation (p…https://github.com/lkollar/cpython/commit/8956434dbc0ece80ecf4c8779c2a843d8f628b9a
pythongh-133968https://github.com/python/cpython/issues/133968
p…https://github.com/python/cpython/pull/135297
8956434https://github.com/lkollar/cpython/commit/8956434dbc0ece80ecf4c8779c2a843d8f628b9a
Pranjal095https://github.com/Pranjal095
on Jul 12, 2025https://github.com/python/cpython/issues/133968#event-18600172327
pythongh-133968: Add fast path to PyUnicodeWriter_WriteStr() (python#…https://github.com/Pranjal095/cpython/commit/1c428efd074a7699eead186e465602ebd47b6085
pythongh-133968https://github.com/python/cpython/issues/133968
python#…https://github.com/python/cpython/pull/133969
1c428efhttps://github.com/Pranjal095/cpython/commit/1c428efd074a7699eead186e465602ebd47b6085
pythongh-133968: Add PyUnicodeWriter_WriteASCII() function (python#13…https://github.com/Pranjal095/cpython/commit/85425a25ffdb45180520b44f3b69fddc90fb2609
pythongh-133968https://github.com/python/cpython/issues/133968
python#13…https://github.com/python/cpython/pull/133973
85425a2https://github.com/Pranjal095/cpython/commit/85425a25ffdb45180520b44f3b69fddc90fb2609
pythongh-133968: Create the Unicode writer on demand in json (python#…https://github.com/Pranjal095/cpython/commit/71aa7bfa62e856262188b2395d91a45bbb6dc4b6
pythongh-133968https://github.com/python/cpython/issues/133968
python#…https://github.com/python/cpython/pull/133832
71aa7bfhttps://github.com/Pranjal095/cpython/commit/71aa7bfa62e856262188b2395d91a45bbb6dc4b6
pythongh-133968: Update PyUnicodeWriter_WriteASCII() documentation (p…https://github.com/Pranjal095/cpython/commit/6fc4eccd36d99d7952b3dff07f081260f5cc0cd3
pythongh-133968https://github.com/python/cpython/issues/133968
p…https://github.com/python/cpython/pull/135297
6fc4ecchttps://github.com/Pranjal095/cpython/commit/6fc4eccd36d99d7952b3dff07f081260f5cc0cd3
taegyunkimhttps://github.com/taegyunkim
on Aug 4, 2025https://github.com/python/cpython/issues/133968#event-18976815124
pythongh-133968: Add fast path to PyUnicodeWriter_WriteStr() (python#…https://github.com/taegyunkim/cpython/commit/a9164b06965375b957e4b648d3a1abaec4e044d0
pythongh-133968https://github.com/python/cpython/issues/133968
python#…https://github.com/python/cpython/pull/133969
a9164b0https://github.com/taegyunkim/cpython/commit/a9164b06965375b957e4b648d3a1abaec4e044d0
pythongh-133968: Add PyUnicodeWriter_WriteASCII() function (python#13…https://github.com/taegyunkim/cpython/commit/3a33b9324c4eda64bb16bdfd57e75be4834e754c
pythongh-133968https://github.com/python/cpython/issues/133968
python#13…https://github.com/python/cpython/pull/133973
3a33b93https://github.com/taegyunkim/cpython/commit/3a33b9324c4eda64bb16bdfd57e75be4834e754c
pythongh-133968: Create the Unicode writer on demand in json (python#…https://github.com/taegyunkim/cpython/commit/bd6baafc005c27efd9ebbffd7c394eaff2bd691a
pythongh-133968https://github.com/python/cpython/issues/133968
python#…https://github.com/python/cpython/pull/133832
bd6baafhttps://github.com/taegyunkim/cpython/commit/bd6baafc005c27efd9ebbffd7c394eaff2bd691a
pythongh-133968: Update PyUnicodeWriter_WriteASCII() documentation (p…https://github.com/taegyunkim/cpython/commit/544a389ed75762972eb4240b4b19853036d1e88e
pythongh-133968https://github.com/python/cpython/issues/133968
p…https://github.com/python/cpython/pull/135297
544a389https://github.com/taegyunkim/cpython/commit/544a389ed75762972eb4240b4b19853036d1e88e
Agent-Hellboyhttps://github.com/Agent-Hellboy
on Aug 19, 2025https://github.com/python/cpython/issues/133968#event-19221795480
pythongh-133968: Update PyUnicodeWriter_WriteASCII() documentation (p…https://github.com/Agent-Hellboy/cpython/commit/80b1e5ea6d0b725f83b5d2405d09ce0dafc02562
pythongh-133968https://github.com/python/cpython/issues/133968
p…https://github.com/python/cpython/pull/135297
80b1e5ehttps://github.com/Agent-Hellboy/cpython/commit/80b1e5ea6d0b725f83b5d2405d09ce0dafc02562
gostak-ddhttps://github.com/gostak-dd
on Jun 2, 2026https://github.com/python/cpython/issues/133968#event-26248258594
pythongh-133968: Add PyUnicodeWriter_WriteASCII() function (python#13…https://github.com/gostak-dd/cpython/commit/c58b376148039d7bb51891c26c79394f2464282f
pythongh-133968https://github.com/python/cpython/issues/133968
python#13…https://github.com/python/cpython/pull/133973
c58b376https://github.com/gostak-dd/cpython/commit/c58b376148039d7bb51891c26c79394f2464282f
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/133968
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/133968
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
performancePerformance or resource usagehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22performance%22
stdlibStandard Library Python modules in the Lib/ directoryhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22stdlib%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
JSON issueshttps://github.com/orgs/python/projects/6
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.