[I18n-sig] CJKCodecs 1.0b1 is released

M.-A. Lemburg mal@lemburg.com
Sat, 12 Jul 2003 21:14:11 +0200


Hye-Shik Chang wrote:
> And, I created utf-8 and utf-16 codec for cjkcodecs just for fun.
> I shipped them because they are somewhat faster than Python's equivalents.

That's interesting. How did you achieve the speedups ? The
Python codecs for these are already rather well optimized.

> (StreamReader benchmarks with a usual 10Kbyte chinese text)
> (all values are in iterates/sec)
> 
>             Python  CJKCodecs
> read(16)    14      187
> read(256)   221     1645
> read(512)   468     1990
> readline    361     921
> readlines   785     1193
> 
> They are not so big and don't replace Python's codecs by default.
> (distributed as commented out on cjkcodecs/aliases.py)
> So, I think they are not so useless comparing to their size.

Ah, I think I know what's causing this: you are measuring
Python function calls (.read() and readlines() for UTF-8/16
are Python functions implemented in codecs.py) against
C type methods.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Software directly from the Source  (#1, Jul 12 2003)
 >>> Python/Zope Products & Consulting ...         http://www.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2003-07-01: Released mxODBC.Zope.DA for FreeBSD             1.0.6 beta 1