Some of my assumptions about Python object allocationIn a reddit comment thread
I was accurately dinged for being a bit casual in how I talked about
object allocation at the end of my previous entry. As the comment notes, calling ' Well, sort of. One of the things I assume about Python is that
allocating and freeing new empty instances of built-in types (such
as ' (Things like zero-length strings and empty tuples can be optimized even further; since they are unchangeable once created, you can have a single null instance of each and just hand out references to it.) I think of instances of Python-level classes as expensive to create and
destroy for two reasons. First, even a very minimal class instance has
a not insignificant amount of overhead; unless it uses |
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |