[Python-Dev] deja-vu .. python locking (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Sep 19 07:13:46 CEST 2006


Phillip J. Eby wrote:

So, I think for your plan to work, you would have to eliminate reference counting, in order to bring the lock overhead down to a manageable level.

There's a possibility it wouldn't be atrociously bad. Seems like it would only add the 3 instructions or whatever overhead to most refcount operations.

How much this would reduce performance depends on what percentage of time is currently used by refcounting. Are there any figures for that?

A quick way of getting an idea of how much effect it would have might be to change Py_INCREF and Py_DECREF to go through the relevant motions, and see what timings are produced for single-threaded code. It wouldn't be a working implementation, but you'd find out pretty quickly if it were going to be a disaster.

-- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | Carpe post meridiem! | Christchurch, New Zealand | (I'm not a morning person.) | greg.ewing at canterbury.ac.nz +--------------------------------------+



More information about the Python-Dev mailing list