Skip to content

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 [email protected]
Co-authored-by: Pablo Galindo [email protected]

…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 <[email protected]>
Co-authored-by: Pablo Galindo <[email protected]>
@lysnikolaou lysnikolaou merged commit 0d0be6b into python:3.13 May 28, 2024
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