Message236302
| Author |
wbolster |
| Recipients |
wbolster |
| Date |
2015年02月20日.16:25:56 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1424449556.4.0.766318893285.issue23493@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The JSON encoder uses a lambda function for the sort(key=...) invocation used to sort the keys in a JSON object in case sort_keys=True is passed:
https://hg.python.org/cpython/file/46bfddb14cbe/Lib/json/encoder.py#l352
Instead of having a lambda, operator.itemgetter(0) can be used here, which is a minor performance gain. It should be noted that many other internals of the JSON encoder have also been fine-tuned (manually) for performance reasons. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2015年02月20日 16:25:56 | wbolster | set | recipients:
+ wbolster |
| 2015年02月20日 16:25:56 | wbolster | set | messageid: <1424449556.4.0.766318893285.issue23493@psf.upfronthosting.co.za> |
| 2015年02月20日 16:25:56 | wbolster | link | issue23493 messages |
| 2015年02月20日 16:25:56 | wbolster | create |
|