Skip to content

Improve performance of json.dumps and json.dump for strings #156241

Open

Description

@eendebakpt

For strings that do not require escaping we can bulk copy the data in ascii_escape_unicode and escape_unicode.

This is in preparation of addressing #129711 by creating a C implementation for json.dump.

Linked PRs

Activity

  1. added
    type-featureA feature request or enhancement
    performancePerformance or resource usage
    stdlibStandard Library Python modules in the Lib/ directory
    on Aug 22, 2026
  2. added a commit that references this issue on Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirperformancePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions