3 ms·
It's very different. LLVM is a portable assembler. PyPy is a compiler generation toolchain. Using LLVM means you don't have to write your assembler backend, how
by fijal 14y ago
It's very different. LLVM is a portable assembler. PyPy is a compiler generation toolchain. Using LLVM means you don't have to write your assembler backend, however, there is much more to the Just in Time compiler than that. LLVM is good at optimizing, but all the optimizations are low level. In order to provide a dynamic language VM, you need to provide optimizations like escape analysis, frame removal, etc. which are out of scope for the LLVM project. On the other hand PyPy gives you that level of optimizations for free (although for example it supports less assembler backends and low-level optimizations might be sub-par).
In short - LLVM is great if you want to write a language like C, PyPy is great if you want to create a dynamic language VM like Python or PHP.