On 8/15/06, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > James Y Knight schrieb: > > But it's the short int that you probably really want to make size > > efficient. > > Only if you have many of them. And if you do, you have the problem > of the special-cased allocator: when the many ints go away, Python > will hold onto their memory forever.
But that's a bit of a corner case. There are plenty of cases where ints are allocated and deallocated at a fast rate without allocating tons of them at once, or where there's no need to reuse the same memory for something else later. I wonder if we could have a smarter int allocator that allocates some ints in a special array but switches to the standard allocator if too many are being allocated? -- --Guido van Rossum (home page: http://www.python.org/~guido/) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com