[Patches] [ python-Patches-1359618 ] Speed charmap encoder

SourceForge.net noreply at sourceforge.net
Sun Jun 4 21:37:47 CEST 2006


Patches item #1359618, was opened at 2005-11-18 09:00
Message generated for change (Settings changed) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1359618&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Performance
Group: None
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Martin v. Löwis (loewis)
Assigned to: M.-A. Lemburg (lemburg)
Summary: Speed charmap encoder

Initial Comment:
This patch speeds up the charmap encoder by a factor of 4 to 5, using a 
trie structure instead of a dictionary; the speedup primarily comes from 
not creating integer objects in the process.

The trie is created by inverting the encoding map; the codec generator is 
changed to drop the encoding dictionary, and instead emit a function call 
to create the trie.

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2006-06-04 21:37

Message:
Logged In: YES 
user_id=21627

Thanks for all comments and reviews; I have now committed
the patch as r46648. This includes a regeneration of the
individual codecs.

----------------------------------------------------------------------

Comment By: M.-A. Lemburg (lemburg)
Date: 2006-05-26 14:00

Message:
Logged In: YES 
user_id=38388

Hi Martin,

I've only had a quick look at the patch, but it looks nice,
so please check it in.

Don't we also have to regenerate all the codecs once this
patch has been applied ?! If so, I can take care of that
using Makefile approach in Tools/unicode/. Please let me know.

Thanks.


----------------------------------------------------------------------

Comment By: Jack Diederich (jackdied)
Date: 2006-05-26 00:45

Message:
Logged In: YES 
user_id=591932

Updated the patch as part of NeedForSpeed
(mainly Py_ssize_t changes and some rejected chunks)

Because the previous version on the trunk was
broken I'm not sure what to compare the results against ;)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1359618&group_id=5470


More information about the Patches mailing list