On 24/10/2007, Antonio Cuni <[EMAIL PROTECTED]> wrote: > Christian Tismer wrote: > >> Isn't this the optimization that Michael already tried? See > >> objspace/std/objspace.py line 65. command line option is > >> --objspace-std-withsmallint > >> > >> I turned out to not be worth it in many cases. > > > > But it is known as a useful special case in the CPython interpreter loop. > > moreover, according to Jim Hugunin, it's also an useful optimization in > IronPython, that's why I decided to try it. > > Btw, I choose int+int for the example but in theory we could apply the > same technique to other cases, says getitem on list and int or getattr > on instances and string. I mean, they are the common cases so it might > be worth of special casing them; of course not manually, that's not the > pypy way :-).
As Carl Friedrich said, I went down this route a bit before, and didn't get very much. Maybe you will have a happier time of it! Cheers, mwh _______________________________________________ [email protected] http://codespeak.net/mailman/listinfo/pypy-dev
