Message215387
| 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). |
|