[Python-Dev] Make re.compile faster (original) (raw)
Victor Stinner victor.stinner at gmail.com
Tue Oct 3 05🔞59 EDT 2017
- Previous message (by thread): [Python-Dev] Make re.compile faster
- Next message (by thread): [Python-Dev] Make re.compile faster
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
* RegexFlag.and and new is called very often.
Yeah, when the re module was modified to use enums for flags, re.compile() became slower: https://pyperformance.readthedocs.io/cpython_results_2017.html#slowdown
It would be nice if internally we could use integers again to reduce this overhead, without loosing the nice representation:
re.I <RegexFlag.IGNORECASE: 2>
Victor
- Previous message (by thread): [Python-Dev] Make re.compile faster
- Next message (by thread): [Python-Dev] Make re.compile faster
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]