Message242300
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. |
|
Date |
User |
Action |
Args |
2015-05-01 06:09:58 | scoder | set | recipients:
+ scoder, rhettinger, mark.dickinson, pitrou, lukasz.langa, serhiy.storchaka |
2015-05-01 06:09:58 | scoder | set | messageid: <1430460598.09.0.779088464881.issue24076@psf.upfronthosting.co.za> |
2015-05-01 06:09:58 | scoder | link | issue24076 messages |
2015-05-01 06:09:56 | scoder | create | |
|