

LLInt: new JS interpreter in webkit with 2-2.5x speedup - igrigorik
http://trac.webkit.org/changeset/108309

======
t-crayford
Nice to see similar approaches to luajit making it elsewhere.

~~~
obtu
How is it like LuaJIT? The calling convention thing means they have a method
JIT, the assembly isn't hand-written, and I don't anything in the commit
message that relates to this list of LuaJIT's innovations:
<http://article.gmane.org/gmane.comp.lang.lua.general/58908>

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.

~~~
olliej
The "old" baseline jit (the middle tier) is a simple "method" hit in the same
vein as V8, it executes directly and accumulates runtime type info -- the
still takes longer to generate and uses more memory than the interpreter. A
lot of short run programs take less time to run than to do codegen for (JSONP
for instance can do really unpleasant things to codegen time)

------
Game_Ender
On a development note, is it normal to drop large features like this a single
commit?

~~~
ootachi
It's Apple's (and Google's) modus operandi. They work in secret, and then they
make huge code drops every so often.

~~~
olliej
If you actually look at the commit logs for javascriptcore you see all
development goes on in public, all patches follow the webkit review rules (you
can't do an unreviewed code dump, and large code dumps aren't pleasant when
you need reviews). JSC is developed in the open, everyone can see the work
we're doing, and the progress we're making, as we're making it. If you had
actually followed the link you would have seen a change log pointing to a bug
on bugs.webkit.org that shows the huge amount of (public) work that preceded
actually landing this <https://bugs.webkit.org/show_bug.cgi?id=75812> .
Additionally there was substantial refactoring in multiple commits leading up
to the final landing of LLInt in order to reduce the patch size as much as
possible.

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.

~~~
ootachi
My apologies then. Google does do that with V8, but your practices sound
great.

------
nwjsmith
Interesting that the offline assembler is written in Ruby. Does anyone know of
any other Webkit work being done in the language?

~~~
olliej
There are various tool scripts in WebKit written in a collection of basically
every common script languages - perl, python, ruby, shell(!!!) are the ones i
can think of off the top of my head.

------
ayosec
So, this means that Google will abandon V8? Or Chrome will continue with it?

~~~
mambodog
JavaScriptCore is used by Safari, iOS and Mac OS. My guess is that Google will
focus on speeding up V8 rather than adopt JSC, but that's just a hunch.

~~~
nieve
HP just released the source code for their Isis browser for webOS on GitHub
and their comments about it all trumpet its use of Javascriptcore (and
QtWebKit). They appear to be using code from around r104935 and it's likely
they'll want to pull in the LLInt/three-tier VM.

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...](https://github.com/isis-
project/WebKit/commit/3c619797d896fd34777ea7e51c1170307e60003f)

