[Raymond] >> I would rather wrap Tim's existing code than muck with assignment >> logic. Ideally, the performance of list.sort() should stay unchanged >> when the key function is not specified. [Guido] > Impossible -- the aux objects tax the memory cache more. Also the > characteristics of the data will be very different. I think Raymond has in mind that if a key argument isn't specified, then aux objects aren't needed, and wouldn't be constructed -- the list would get sorted the same way it does now. >> ... >> Alternatively, is there a way of telling a PyInt to be mortal? There isn't, but we shouldn't let that drive anything. I don't think any law requires that Python always have an unbounded freelist for int objects. Most objects with custom freelists put a bound on the freelist size (as Guido noted in this thread for small tuples). I'm not sure why ints don't; I guess nobody ever felt motivated enough to stick a bound on 'em.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4