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.

classification
Title: Speed charmap encoder
Type: Stage:
Components: Interpreter Core Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: lemburg Nosy List: jackdied, lemburg, loewis
Priority: normal Keywords: patch

Created on 2005-11-18 08:00 by loewis, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
encode2.diff loewis, 2005-11-18 08:00
Messages (4)
msg49065 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-11-18 08:00
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.
msg49066 - (view) Author: Jack Diederich (jackdied) * (Python committer) Date: 2006-05-25 22:45
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 ;)
msg49067 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2006-05-26 12:00
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.
msg49068 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-06-04 19:37
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.
History
Date User Action Args
2022-04-11 14:56:14adminsetgithub: 42606
2005-11-18 08:00:17loewiscreate