A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-April/044367.html below:

[Python-Dev] Optimization targets - refcount

[Python-Dev] Optimization targets - refcountGreg Ewing greg at cosc.canterbury.ac.nz
Sun Apr 18 05:23:15 EDT 2004
"Phillip J. Eby" <pje at telecommunity.com>:

> 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 at cosc.canterbury.ac.nz	   +--------------------------------------+

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4