[Cython] [cython] Initial startswith / endswith optimization (#35)

Robert Bradshaw robertwb at math.washington.edu
Wed May 25 22:52:21 CEST 2011


On Wed, May 25, 2011 at 1:41 PM, John Ehresman <jpe at wingware.com> wrote:
> On 5/25/11 3:51 PM, Robert Bradshaw wrote:
>>
>> I'm glad you're thinking about this question, some explanation of the
>> various string types is at
>> http://wiki.cython.org/enhancements/stringliterals
>>
>> Probably the way to do this is have one optimization for bytes, one
>> for unicode, and then have a third type for str that dispatches to the
>> one or the other depending on the python version (using #define).
>
> I think this means that the current unicode optimizations aren't used when
> variables are declared as str and a python 3 runtime is used. Should all
> unicode optimizations support str eventually?

Yes.


More information about the cython-devel mailing list