"Phillip J. Eby"
I'm not sure, however, that this would be common enough to be helpful. It seems to me Py_INCREF should effectively translate to only a single machine instruction or two.
On a RISC architecture, probably 3 instructions -- load, increment, store. It's the memory accesses that will be the most expensive part of this. But then, if increfing Py_None is really that common, its refcount will likely be in cache. I doubt whether it really is very common, though, compared to increfs of all other objects. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+