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

2011-05-26 Thread Stefan Behnel
John Ehresman, 26.05.2011 22:02: On 5/26/11 3:27 AM, Stefan Behnel wrote: 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. Well, minus those t

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

2011-05-26 Thread John Ehresman
On 5/26/11 3:27 AM, Stefan Behnel wrote: 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. Well, minus those that are not portable. For example,

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

2011-05-26 Thread Robert Bradshaw
On Thu, May 26, 2011 at 1:43 AM, Stefan Behnel wrote: > Dag Sverre Seljebotn, 26.05.2011 10:24: >> >> On 05/26/2011 10:12 AM, Stefan Behnel wrote: >>> >>> Robert Bradshaw, 26.05.2011 09:40: the pattern of swapping out builtin methods (and perhaps functions) with more optimized C ver

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

2011-05-26 Thread Dag Sverre Seljebotn
On 05/26/2011 10:43 AM, Stefan Behnel wrote: Dag Sverre Seljebotn, 26.05.2011 10:24: On 05/26/2011 10:12 AM, Stefan Behnel wrote: Robert Bradshaw, 26.05.2011 09:40: the pattern of swapping out builtin methods (and perhaps functions) with more optimized C versions is something that perhaps it w

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

2011-05-26 Thread Stefan Behnel
Dag Sverre Seljebotn, 26.05.2011 10:24: On 05/26/2011 10:12 AM, Stefan Behnel wrote: Robert Bradshaw, 26.05.2011 09:40: the pattern of swapping out builtin methods (and perhaps functions) with more optimized C versions is something that perhaps it would be good to be able to do more generally,

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

2011-05-26 Thread Dag Sverre Seljebotn
On 05/26/2011 10:12 AM, Stefan Behnel wrote: Robert Bradshaw, 26.05.2011 09:40: the pattern of swapping out builtin methods (and perhaps functions) with more optimized C versions is something that perhaps it would be good to be able to do more generally, rather than hard coding the list into Opt

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

2011-05-26 Thread Stefan Behnel
Robert Bradshaw, 26.05.2011 09:40: the pattern of swapping out builtin methods (and perhaps functions) with more optimized C versions is something that perhaps it would be good to be able to do more generally, rather than hard coding the list into Optimize.py. Right. All that would really be ne

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

2011-05-26 Thread Robert Bradshaw
On Thu, May 26, 2011 at 12:27 AM, Stefan Behnel wrote: > Robert Bradshaw, 25.05.2011 22:52: >> >> On Wed, May 25, 2011 at 1:41 PM, John Ehresman 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 st

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

2011-05-26 Thread Stefan Behnel
Robert Bradshaw, 25.05.2011 22:52: On Wed, May 25, 2011 at 1:41 PM, John Ehresman 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

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

2011-05-26 Thread Stefan Behnel
jpe, 25.05.2011 21:37: This optimizes startswith / endwith optimization for str. What's unclear to me is how str will be mapped to either bytes or unicode Should I be using the type name bytes instead of str? Different things. Robert already pointed you to the Wiki site. Basically, "str" i