This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Giovanni.Bajo
Recipients Arfrever, Bob.Ziuchkovski, Giovanni.Bajo, PaulMcMillan, ReneSac, Vlado.Boza, alex, arigo, benjamin.peterson, camara, christian.heimes, cvrebert, dmalcolm, gregory.p.smith, iElectric, koniiiik, lemburg, mark.dickinson, ncoghlan, sbermeister, serhiy.storchaka, vstinner, Łukasz.Rekucki
Date 2013-01-02.18:56:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <E0D0C138-C2B0-40E1-8819-42B8B88272B8@gmail.com>
In-reply-to <1357152712.45.0.811391231368.issue14621@psf.upfronthosting.co.za>
Content
Il giorno 02/gen/2013, alle ore 19:51, Christian Heimes <report@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
History
Date User Action Args
2013-01-02 18:56:26Giovanni.Bajosetrecipients: + Giovanni.Bajo, lemburg, arigo, gregory.p.smith, mark.dickinson, ncoghlan, vstinner, christian.heimes, benjamin.peterson, iElectric, Arfrever, alex, cvrebert, dmalcolm, PaulMcMillan, serhiy.storchaka, Vlado.Boza, koniiiik, sbermeister, camara, Łukasz.Rekucki, ReneSac, Bob.Ziuchkovski
2013-01-02 18:56:26Giovanni.Bajolinkissue14621 messages
2013-01-02 18:56:26Giovanni.Bajocreate