-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
Open
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
I know that there were discussions about rewriting CSV Sniffer, and they seem to be on hold, to avoid breaking any code relying on its behavior.
I believe it's possible, though, to still make it significantly faster.
The current code iterates over 127 ASCII characters and counts their occurences on each line, even if they're not present:
Line 382 in b36d23f
for char in ascii: |
It's highly inefficient. We can count only present characters, and backfill zeros.
CPython versions tested on:
3.15
Operating systems tested on:
macOS
Linked PRs
Metadata
Metadata
Assignees
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error