Giovanni Bajo added the comment:

Il giorno 02/gen/2013, alle ore 19:51, Christian Heimes 
<rep...@bugs.python.org> ha scritto:

> 
> Christian Heimes added the comment:
> 
> Giovanni, why do you think that hashing of unicode strings is slower than 
> byte strings? 
> 
> First of all ASCII only unicode strings are packed and use just one byte per 
> char. CPython's FNV implementation processes one element in each cycle, that 
> is one byte for bytes and ASCII unicode, two bytes for UCS-2 and four bytes 
> for UCS-4. Bytes and UCS-4 strings require the same amount of CPU 
> instructions.

Ah sorry, I stand corrected (though packing wasn't there in 3.0, was it? I was 
specifically referred to the 2.x -> 3.0 transition).
-- 
Giovanni Bajo

My Blog: http://giovanni.bajo.it

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14621>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to