[Python-ideas] string codes & substring equality
spir
denis.spir at gmail.com
Wed Nov 27 22:30:09 CET 2013
On 11/27/2013 04:26 PM, Masklinn wrote:
>> >In both cases, I guess ordinary idiomatic Python code actually _creates_ a new string object, as a substring of length 1 or more, which is otherwise useless
> Have you tried using memoryviews? (or buffers for older python compat’)
No, but I'll keep this idea aside if ever I really need improved performance in
general. For now, I just tried to avoid unneeded object creations, and this at
the core points of a parsing process. (This is more or less equivalent to a
inner loop, except that for a parser it's rather the core of all scanning loop,
the lowest-level matching routines.)
Thank you for the suggestion,
Denis
More information about the Python-ideas
mailing list