Message215387
> 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). |
|
Date |
User |
Action |
Args |
2014-04-02 15:00:33 | pitrou | set | recipients:
+ pitrou, vstinner, ezio.melotti, serhiy.storchaka, josh.r |
2014-04-02 15:00:33 | pitrou | set | messageid: <1396450833.72.0.0820949096336.issue21118@psf.upfronthosting.co.za> |
2014-04-02 15:00:33 | pitrou | link | issue21118 messages |
2014-04-02 15:00:33 | pitrou | create | |
|