Title: Explore SIMD-accelerated parsing architecture for the standard json module · Issue #142915 · python/cpython · GitHub
Open Graph Title: Explore SIMD-accelerated parsing architecture for the standard json module · Issue #142915 · python/cpython
X Title: Explore SIMD-accelerated parsing architecture for the standard json module · Issue #142915 · python/cpython
Description: Feature or enhancement Proposal: Motivation The standard library json module is widely used and highly stable, but its core parsing architecture is still fundamentally scalar and recursive-descent based. On modern CPUs (especially x86_64...
Open Graph Description: Feature or enhancement Proposal: Motivation The standard library json module is widely used and highly stable, but its core parsing architecture is still fundamentally scalar and recursive-descent ...
X Description: Feature or enhancement Proposal: Motivation The standard library json module is widely used and highly stable, but its core parsing architecture is still fundamentally scalar and recursive-descent ...
Opengraph URL: https://github.com/python/cpython/issues/142915
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Explore SIMD-accelerated parsing architecture for the standard json module","articleBody":"# Feature or enhancement\n\n### Proposal:\n\n**Motivation**\n\nThe standard library json module is widely used and highly stable, but its core parsing architecture is still fundamentally scalar and recursive-descent based. On modern CPUs (especially x86_64 and increasingly ARM64), JSON parsing is often dominated by:\n- UTF-8 validation\n- structural character detection ({ } [ ] , :)\n- whitespace skipping\n\nThese stages are well known to be amenable to SIMD acceleration.\nProjects such as simdjson demonstrate that a two-stage parsing pipeline (structural scan + semantic parsing), driven by SIMD instructions, can deliver multiple-x speedups while remaining fully compliant with RFC 8259.\n\nGiven the growing importance of JSON in performance-sensitive workloads (ML pipelines, telemetry, configuration at scale), I would like to propose a discussion on whether CPython’s json module could adopt a simdjson-inspired architecture, at least optionally.\n\n**Scope of the proposal**\n\nThis issue is not a request to immediately replace the existing implementation. Instead, I would like to explore:\n1. Feasibility\nWhether a SIMD-based parsing backend could coexist with the current implementation.\nWhether this would fit CPython’s portability and maintenance constraints.\n2. Architecture\nA staged parsing model similar to simdjson:\n - Stage 1: SIMD structural scan (identify string boundaries, braces, commas, etc.)\n - Stage 2: scalar semantic parsing using the structural index\n\n**Integration options**\n- Optional backend selected at build time or runtime\n- Fallback to the existing implementation when SIMD is unavailable\n\n### Has this already been discussed elsewhere?\n\nNo response given\n\n### Links to previous discussion of this feature:\n\n_No response_","author":{"url":"https://github.com/ErwinCell","@type":"Person","name":"ErwinCell"},"datePublished":"2025-12-18T02:45:16Z","url":"https://github.com/python/cpython/issues/142915"}
| 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:ab111a57-1877-7817-1afe-d00b186072de |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D548:11EACE:3560D6A:473E706:6B020397 |
| html-safe-nonce | 0b93db3774b5ad1bf9f2e49edddbfd6fb7a3d8dec3968430eb4f8eaab2217b1a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENTQ4OjExRUFDRTozNTYwRDZBOjQ3M0U3MDY6NkIwMjAzOTciLCJ2aXNpdG9yX2lkIjoiOTkyNTAzNTcxNjU4NDQxNjIzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bd0c97ce5fc9cf3804cfc73bccc8bb5f263a00ad85464ec235b35559233d5b3e |
| hovercard-subject-tag | issue:3741197850 |
| 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/142915/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c744d3409f121a8e6cd1b969a2b43107e2edbdab21453de6b732bc43c4bb178b/python/cpython/issues/142915 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c744d3409f121a8e6cd1b969a2b43107e2edbdab21453de6b732bc43c4bb178b/python/cpython/issues/142915 |
| og:image:alt | Feature or enhancement Proposal: Motivation The standard library json module is widely used and highly stable, but its core parsing architecture is still fundamentally scalar and recursive-descent ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ErwinCell |
| 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