Message242300
| Author |
scoder |
| Recipients |
lukasz.langa, mark.dickinson, pitrou, rhettinger, scoder, serhiy.storchaka |
| Date |
2015年05月01日.06:09:56 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1430460598.09.0.779088464881.issue24076@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I don't think it's irrelevant. Throw-away integers are really not uncommon. For-loops use them quite often, non-trivial arithmetic expressions can create a lot of intermediate temporaries. Speeding up the create-delete cycle of PyLong sounds like a very obvious thing to do.
Imagine some code that iterates over a list of integers, applies some calculation to them, and then stores them in a new list, maybe even using a list comprehension or so. If you could speed up the intermediate calculation by avoiding overhead in creating temporary PyLong objects, such code could benefit a lot.
I suspect that adding a free-list for single-digit PyLong objects (the most common case) would provide some visible benefit. |
|