LLInt: new JS interpreter in webkit with 2-2.5x speedup
trac.webkit.org
trac.webkit.org
I'd be curious in seeing more JITs using crankshaft's approach: generate machine code directly, that both executes the original js and gathers runtime feedback.
The reason the LLInt landed as a "code dump" is because that is the minimal size possible - you can't land part of an execution engine, as by definition part of an engine is not sufficient to pass tests. As it is, this is only 32 bit for the simple reason that 32-bit x86 is the easiest way to stress register allocation, our value encoding requires two 32bit registers per value and 32bit x86 has very few registers.
TLDR; You can't really do massive codedumps in the webkit repository, the commit rules make it very hard. Alas some patches are intrinsically large though as a partial patch won't be sufficient to pass tests, but even then we don't like them.
There are some things (like this patch) where the core change (in this case a new execution engine) can't be landed in pieces (either you have a complete working execution engine that will pass all tests, and won't regress performance, or you don't). But even in these cases we try to reduce the size and complexity of the core patch. If you look at the recent commits to JSC you'll see a bunch of refactoring landing prior to LLInt that got the non-LLInt specific code into the tree in advance of LLInt itself. As it is the initial commit only has support for our 32bit encoding, and doesn't support all the backends that the JSC JIT supports. The basic reason for this is that the static assembler does need to do some register allocation and the easy way to ensure that it's correct is to through it at 32 bit x86. Our value representation requires 2 registers on 32 bit platforms, and x86-32 has very few GPRs we can use, so it acts as an excellent stress test vs. any other supported platform.
It's newer than anything they've shipped (actually just about everything is, which is a nice change of pace) and we're all waiting like kids on a sugar buzz for the HP-supported effort by the homebrew community to get all the new pieces out through Preware. I will be amused if this hits webOS as an official release before any of the other tablet OSes, but HP seems to be taking the Dadaist approach to the platform.
http://isis-project.org/projects.html https://github.com/isis-project/ https://github.com/isis-project/WebKit/commit/3c619797d896fd...
Chrome uses V8 instead of JavaScriptCore, and I don't think anything would make them change, since having their own VM is such a large asset for Google (for example, they can use V8 to promote Dart).
JavaScriptCore actually has several JITs. There was the simple JIT that translates JS bytecode to machine code (I think it's called "method JIT"). There's a more advanced JIT that does data flow analysis. This is fairly new; I think it shipped last year in 64-bit Safari.
This new development is about improving performance on code that may not need to be JIT-compiled. Instead of always going to the JIT, they now use a fast interpreter (called LLInt), and only do the native compilation if a code path is deemed hot.
If those benchmarks are missing something important, we need better ones.