On 2017-01-26 21:46, Sven R. Kunze wrote:
On 26.01.2017 22:33, Vlastimil Brom wrote:
Hi,
I can't speak about the details of mrab's implementation, but using
regex, I get the resulting match instantly: [...]

Nice! I focused on the stdlib re module as this is mainly used by other
frameworks (like Django).

(I personally prefer to use regex for other advantages, than this
artificial case, but it certainly doesn't hurt to have better
performance here too:)

Me, too.

So, it seems as if regex already uses a better algorithm although I
couldn't find any reference to any regex theoretical framework like dfa,
nfa, thompson multiple-state simulation or something.

It still uses backtracking, like in the re module.

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to