[Python-Dev] tuple[int] optimization (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Sun Jul 24 01:27:55 CEST 2011
- Previous message: [Python-Dev] tuple[int] optimization
- Next message: [Python-Dev] tuple[int] optimization
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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(BINARYSUBSCR) w = POP(); v = TOP(); x = PyObjectGetItem(v, w); PyDECREF(v); PyDECREF(w); SETTOP(x); if (x != NULL) DISPATCH(); break; The implementation of PyObjectGetItem 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.
- Previous message: [Python-Dev] tuple[int] optimization
- Next message: [Python-Dev] tuple[int] optimization
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]