(original) (raw)
On Wed, Jul 18, 2012 at 8:27 AM, Stefan Behnel <stefan_ml@behnel.de> wrote:
martin@v.loewis.de, 18.07.2012 07:53:
> [Victor Stinner]
>> I don't want to write my own library to generate machine code.As I said, generating machine code is the uninteresting part of it and
>
> I plan to use nanojit.
won't give you much of a win. The changes you make to the way the code
works while walking the path from seeing the Python code to generating
machine code is what makes the difference.
You could even skip the machine code generation all together and just go
with triggering pre-implemented high-level patterns from the interpreter.
If you code up the right patterns, your win would be bigger than with a
bare 1:1 mapping from Python code to machine code. Both Cython and WPython
are clear examples for that.
Stefan
It's uninteresting but it's completely necessary and it's still quite a bit of work. For the PyPy needs llvm failed to provide some features (besides being buggy), like dynamic patching of compiled assembler (you kind of need that for the tracing JIT when you discover new paths) or speed of execution.
Cheers,
fijal