"monty" < "python"

Mark Lawrence breamoreboy at yahoo.co.uk
Sat Mar 23 12:06:23 EDT 2013


On 23/03/2013 09:23, jmfauth wrote:
> On 21 mar, 04:12, rusi <rustompm... at gmail.com> wrote:
>> On Mar 21, 12:40 am, jmfauth <wxjmfa... at gmail.com> wrote:
>>
>>> ----
>>
>>> Courageous people can try to do something with the unicode
>>> collation algorithm (see unicode.org). Some time ago, for the fun,
>>> I wrote something (not perfect) with a reduced keys table (see
>>> unicode.org), only a keys subset for some scripts hold in memory.
>>
>>> It works with Py32 and Py33. In an attempt to just see the
>>> performance and how it "can react", I did an horrible mistake,
>>> I forgot Py33 is now optimized for ascii user, it is no more
>>> unicode compliant and I stupidely tested/sorted lists of French
>>> words...
>>
>> Now lets take this piece by piece…
>> "I did an horrible mistake" : I am sorry. Did you get bruised? Break
>> some bones? And is 'h' a vowel in french?
>> "I forgot Py33 is now optimized for ascii user"  Ok.
>> "it is no more unicode compliant" I asked earlier and I ask again --
>> What do you mean by (non)compliant?
>
> ------
>
> One aspect of Unicode (note the capitalized "U").
>
> py32
>>>> timeit.repeat("'abc需'.find('a')")
> [0.27941279564856814, 0.26568106110789813, 0.265546366757917]
>>>> timeit.repeat("'abcdef'.find('a')")
> [0.2891812867801491, 0.26698153112010914, 0.26738994644529157]
>
> py33
> timeit.repeat("'abc需'.find('a')")
> [0.5941777382531654, 0.5829193385634426, 0.5519412133990045]
> timeit.repeat("'abcdef'.find('a')")
> [0.44333188136533863, 0.4232506078969891, 0.4225164843046514]
>
> jmf
>

Are you saying that to be compliant a unicode implementation has to 
perform within given time bounds?

-- 
Cheers.

Mark Lawrence




More information about the Python-list mailing list