wrapt icon indicating copy to clipboard operation
wrapt copied to clipboard

Improve efficiency of string comparisons in WraptObjectProxy_setattro().

Open GrahamDumpleton opened this issue 12 years ago • 0 comments

When checking for 'self' prefix, currently invoking starts with() method of the string object.

It would be more efficient where the name is a string object to use PyString_AsString() to get access to the character array and then use strstr() or equivalent.

Similarly for a Unicode string and using Python 3, can use PyUnicode_AsUTF8AndSize().

GrahamDumpleton avatar Sep 24 '13 11:09 GrahamDumpleton