Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.13] gh-119118: Fix performance regression in tokenize module (GH-119615) #119682

Merged
merged 1 commit into from
May 28, 2024

Conversation

miss-islington
Copy link
Contributor

  • Cache line object to avoid creating a Unicode object
    for all of the tokens in the same line.
  • Speed up byte offset to column offset conversion by using the
    smallest buffer possible to measure the difference.

(cherry picked from commit d87b015)

Co-authored-by: Lysandros Nikolaou lisandrosnik@gmail.com
Co-authored-by: Pablo Galindo pablogsal@gmail.com

…nGH-119615)

* pythongh-119118: Fix performance regression in tokenize module

- Cache line object to avoid creating a Unicode object
  for all of the tokens in the same line.
- Speed up byte offset to column offset conversion by using the
  smallest buffer possible to measure the difference.

(cherry picked from commit d87b015)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
@lysnikolaou lysnikolaou merged commit 0d0be6b into python:3.13 May 28, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants