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 pitrou
Recipients ezio.melotti, josh.r, pitrou, serhiy.storchaka, vstinner
Date 2014-04-02.15:00:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1396450833.72.0.0820949096336.issue21118@psf.upfronthosting.co.za>
In-reply-to
Content
> bytes.translate() is much faster because it builds a C array of 256
> items to fast table lookup, whereas str.translate() requires a Python
> dict lookup for each character, which is much slower.

It should be easy to devise a simple hash table for the common case of one-to-one translation (and also deletion).
History
Date User Action Args
2014-04-02 15:00:33pitrousetrecipients: + pitrou, vstinner, ezio.melotti, serhiy.storchaka, josh.r
2014-04-02 15:00:33pitrousetmessageid: <1396450833.72.0.0820949096336.issue21118@psf.upfronthosting.co.za>
2014-04-02 15:00:33pitroulinkissue21118 messages
2014-04-02 15:00:33pitroucreate