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/2011-July/112490.html below:

[Python-Dev] tuple[int] optimization

[Python-Dev] tuple[int] optimization [Python-Dev] tuple[int] optimizationAntoine Pitrou solipsis at pitrou.net
Sun Jul 24 01:27:55 CEST 2011
On Sun, 24 Jul 2011 09:13:07 +1000
Ryan Kelly <ryan at rfk.id.au> wrote:
> 
> In latest trunk this optimisation seems to have gone away, the code is
> now:
> 
>         TARGET(BINARY_SUBSCR)
>             w = POP();
>             v = TOP();
>             x = PyObject_GetItem(v, w);
>             Py_DECREF(v);
>             Py_DECREF(w);
>             SET_TOP(x);
>             if (x != NULL) DISPATCH();
>             break;
> 
> The implementation of PyObject_GetItem doesn't appear to have changed
> though.  Maybe this optimisation was no longer worth it in practice? 

The optimization was probably removed because PyInt objects don't exist
anymore. There's a related but more ambitious patch at
http://bugs.python.org/issue10044.

In practice however, such micro-optimizations usually have little or no
effect.

Regards

Antoine.


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