[Python-ideas] Support parsing stream with `re`

Cameron Simpson cs at cskk.id.au
Sun Oct 7 02:59:43 EDT 2018


On 07Oct2018 07:32, Ram Rachum <ram at rachum.com> wrote:
>On Sun, Oct 7, 2018 at 4:40 AM Steven D'Aprano <steve at pearwood.info> wrote:
>> I'm sure that Python will never be as efficient as C in that regard
>> (although PyPy might argue the point) but is there something we can do
>> to ameliorate this? If we could make char-by-char processing only 10
>> times less efficient than C instead of 100 times (let's say...) perhaps
>> that would help Ram (and you?) with your use-cases?
>>
>Does that mean I'll have to write that character-by-character algorithm? I
>could already do that now I guess, the speed doesn't matter for my use
>case, but I'm trying to avoid writing an algorithm.

No. You can write a line by line loop. See my other post.

Cheers,
Cameron Simpson <cs at cskk.id.au>


More information about the Python-ideas mailing list