Hi David, 2007/8/22, David Cournapeau <[EMAIL PROTECTED]>: > For example, the following python code: > > class A: > def _foo(self): > return None > def foo(self): > return self._foo() > > Is extremely slow compared to a compiled language like C. On my > computer, I can only execute the above function around 1 millon times a > second (it takes around 3500 cycles by using %timeit from ipython). This > forces me to avoid functions in some performance intensive code, which > is ugly. Basically, I am interested in the kind of things described > there: http://www.avibryant.com/2006/09/index.html.
This page is talking about polymorphic inline caches. One of the more important building blocks of our JIT, "promotion", can be considered to be a generalization of polymorphic inline caches. So yes, PyPy's Jit will eventually be able to do things like this. Cheers, Carl Friedrich _______________________________________________ [email protected] http://codespeak.net/mailman/listinfo/pypy-dev
