[pypy-dev] How's the JIT coming along?

Carl Friedrich Bolz cfbolz at gmx.de
Wed Aug 22 16:09:21 CEST 2007


Hi David,

2007/8/22, David Cournapeau <david at ar.media.kyoto-u.ac.jp>:
> 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



More information about the Pypy-dev mailing list