A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-October/149716.html below:

[Python-Dev] Make re.compile faster

[Python-Dev] Make re.compile faster [Python-Dev] Make re.compile fasterVictor Stinner victor.stinner at gmail.com
Tue Oct 3 05:18:59 EDT 2017
> * 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

https://speed.python.org/timeline/#/?exe=12&ben=regex_compile&env=1&revs=200&equid=off&quarts=on&extr=on

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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4