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 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>
@lysnikolaoulysnikolaou merged commit 4a0af0c into python:3.12May 28, 2024
@miss-islingtonmiss-islington deleted the backport-d87b015-3.12 branch January 2, 2026 18:47
Sign up for freeto 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

@miss-islington@lysnikolaou