[Python-ideas] Delivery Status Notification (Failure)

Jacco van Dorp j.van.dorp at deonet.nl
Tue May 8 02:51:48 EDT 2018


2018-05-07 21:56 GMT+02:00 Neil Girdhar <mistersheik at gmail.com>:
> Regular expressions are not just "an order of magnitude better"—they're
> asymptotically faster.  See
> https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm
> for a non-regular-expression algorithm.

Hence my

>> [Jacco wrote, capitalized important words]
>> regular expressions would probably be AT LEAST an order of magnitude
>> better in speed, if it's a bottleneck to you. But pure python
>> implementation for this is a lot easier than it would be for the
>> current string.count().
>>

But I think my point stands that that's what you need to do if speed
is an issue, and python code is fine when it isn't.

Also, intersting read. Thanks.


Jacco


More information about the Python-ideas mailing list