Message216683
| Author |
josh.r |
| Recipients |
bgailer, docs@python, josh.r, martin.panter |
| Date |
2014年04月17日.10:43:16 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1397731396.33.0.0205968308226.issue21279@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
For the record, I have intentionally used bytes.maketrans to make translation table for str.translate for precisely this reason; it's much faster to look up a ordinal in a bytes object than in a dictionary. Before the recent (partial) patch for str.translate performance (#21118), this was a huge improvement if you only needed to worry about latin-1 characters (though encoding to latin-1, using bytes.translate, then decoding again was still faster). It's still faster than using a dictionary even with the patch from #21118, but it's not nearly as significant. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2014年04月17日 10:43:16 | josh.r | set | recipients:
+ josh.r, bgailer, docs@python, martin.panter |
| 2014年04月17日 10:43:16 | josh.r | set | messageid: <1397731396.33.0.0205968308226.issue21279@psf.upfronthosting.co.za> |
| 2014年04月17日 10:43:16 | josh.r | link | issue21279 messages |
| 2014年04月17日 10:43:16 | josh.r | create |
|