-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Improve speed of test_tokenize.StringPrefixTest.test_prefixes #134752
Copy link
Copy link
Closed
Labels
3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixespendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixes3.15pre-release feature fixes, bugs and security fixespre-release feature fixes, bugs and security fixespendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Fields
Give feedbackNo fields configured for issues without a type.
Bug report
Bug description:
It takes about 0.5 seconds to run, because it's doing 127,452 eval statements. It could no doubt be sped up, although I might have to sacrifice some completeness. For example, one simplifying assumption is that all multi-character string prefixes must begin with one of the single-character prefix. I guess it's possible that this won't always be the case, but it seems likely to continue.
CPython versions tested on:
3.15
Operating systems tested on:
Windows
Linked PRs