The First 15 Years of PyPy – A Personal Retrospective
morepypy.blogspot.com
morepypy.blogspot.com
Here's a paper regarding a pair of language implementors' experience using both techniques:
http://stefan-marr.de/papers/oopsla-marr-ducasse-meta-tracin...
By changing the abstract syntax tree during execution, type-generic nodes in the AST can be replaced with type-specialized nodes. This carries more overhead than tracing through the interpreter. It also requires more explicit work from the user to achieve optimized results.
The authors of the above study conclude that the resulting performance was similar, but that meta-tracing was an easier technique to use than PE. This agrees with the OP's assessment.
I feel that PyPy need to receive much more love and attention than it actually gets. I already donated, and put all my hopes on PyPy. The Windows is also very renegaded, where the multiprocessing module is unusable. I hope to get some time soon to help this incredible project and finish lib_pypy/_winapi.py.
I see Julia and JavaScript eventually wining over those that can't be bothered to deal with C for the extra performance step.
The point is the lack of adoption of JIT runtimes across the Python community at large.
Including things like modifying every pixel of an image, and other things that need to be fast-ish.
That has always been my reason for not giving a Cython a real chance. I'm afraid I would go through the trouble porting everything, then have a use case where I need to just run pure python.
I've considered having a compat layer where you import dummy versions of all the classes and decorators if cython isn't present. Has anyone ever tried that?
[1] https://github.com/cython/cython/issues/1672#issuecomment-33...
(On a side note, using this feature led to a particularly memorable debugging session that set a personal record in terms of time spent vs amount of code changed to fix the issue: https://news.ycombinator.com/item?id=11115110 ).
https://cython.readthedocs.io/en/latest/src/tutorial/pure.ht...
In the standard library, they maintain both Python and C versions of some modules:
What is the accepted/common runtime for production python code ?
Is it cpython, ironpython ? Is the plain python interpreter fast enough ?
(I am referring to cases where python is not just a thin wrapper around C libs)
But now I have another rabbit hole to deep dive down in the form of meta-tracing JITs.
On the other hand, I think it is somewhat deterimental to the success of the idea of meta-tracing that really the only working production grade implementation of the idea is RPython. RPython is very idiosyncratic, to say the least. I think a good implementation of meta-tracing on boring technology (say, C++) would greatly help popularize the idea.