Jon Simpson

Pools in Python

15 Jun 2010

Object pooling is pre-allocating a number of objects to use later. It is done by creating a group of objects (pool) initially and when you need an object, you take one from the pool rather than creating it. When you are done with the object you send it back to the pool.

Nice explanation and small example of using object pools in Python, along with some performance measurements.


 Home