Re: unicode speed

2005-11-30 Thread David Siroky
V Tue, 29 Nov 2005 10:14:26 +, Neil Hodgson napsal(a): > David Siroky: > >> output = '' > > I suspect you really want "output = u''" here. > >> for c in line: >> if not unicodedata.combining(c): >> output += c > > This is creating as many as 5 new st

Re: unicode speed

2005-11-29 Thread jepler
On Tue, Nov 29, 2005 at 09:48:15AM +0100, David Siroky wrote: > Hi! > > I need to enlighten myself in Python unicode speed and implementation. > > My platform is AMD [EMAIL PROTECTED] (x86-32), Debian, Python 2.4. > > First a simple example (and time results): > > x = "a"*5000 > real0m0

Re: unicode speed

2005-11-29 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, David Siroky <[EMAIL PROTECTED]> wrote: > Hi! > > I need to enlighten myself in Python unicode speed and implementation. > > My platform is AMD [EMAIL PROTECTED] (x86-32), Debian, Python 2.4. > > First a simple example (and time results): > > x = "a"*5000 >

Re: unicode speed

2005-11-29 Thread Neil Hodgson
David Siroky: > output = '' I suspect you really want "output = u''" here. > for c in line: > if not unicodedata.combining(c): > output += c This is creating as many as 5 new string objects of increasing size. To build large strings, some common faster t