
FTL: WebKit’s LLVM-based JIT - dochtman
http://blog.llvm.org/2014/07/ftl-webkits-llvm-based-jit.html
======
andrewchambers
Unfortunately I think the increased complexity in javascript engines is also a
security risk.

Fuzzing and other techniques may be able to cause all sorts of crashes and
memory corruptions in the jit compilers code or in the generated code. This
issue may have just been amplified by the extra complexity in the massive
amount of LLVM C++ code added.

This is less of an issue for llvm when used as a static compiler, but as a jit
on untrusted code, I don't know.

Time will tell, but I wonder if Rusts memory safety will make it a better
candidate for implementing advanced JIT engines that process untrusted code
than C++ like in LLVM.

~~~
higherpurpose
And Apple is forcing all other browsers to use its JS engine on iOS - so when
Safara/its JS engine falls, they all fall.

~~~
Alphasite_
But that misses the other side of the argument, a fix for them is a fix for
everyone and improvements to core are free improvements for everyone.

~~~
higherpurpose
By that logic we should all be happy that Flash isn't a spec implemented in 4
different browsers, but rather on monolithic monster from one company, in all
of them.

------
AndrewDucker
I'm intrigued that they keep pointing out that it's not using any asm.js
optimisations, but still "performs well".

"Performing well" in this case still means significantly slower than Firefox
does on the same code:

[http://arewefastyet.com/#machine=12&view=breakdown&suite=asm...](http://arewefastyet.com/#machine=12&view=breakdown&suite=asmjs-
apps)

Which isn't to say that it's not a big improvement over where it was. But
there's still a way to go on making it competitive, so far as I can see.

Edit: Got name of the original engine wrong.

~~~
CJefferson
Personally, I am more interested in improvements to asm.js like code. The
limitations of asm.js, in particular the inability to allocate memory, greatly
limits its usefulness for many applications.

~~~
mnemonik
A work around is to pass a foreign function into your asm.js module to do
allocations for you, but then you have to either implement your own GC, do
reference counting, or just come up with some hand rolled lifetime management.

I'm also interested in how asm.js could be improved in this regard without
moving away from its existing barebones model. Would love to hear ideas.

I think the first thing we will see is shared array buffers between workers
because games really need that.

------
ksec
It seems there were a lot of new "features" in LLVM to get this right. Where
previously most of the Dynamic Script replying on LLVM hoping to speeds things
up simply wasn't possible. ( Project Unladen Swallow. )

Dropbox's Pyston seems to have it this round.

Will Rubinius get any more substantial improvement? It seems to be in
maintenance mode rather then development mode.

------
ramigb
Some of the google documnets were not shared probably, would you please share
them? like the "FTL Performance" one it gives me:

"Your current account ( __ __ __@gmail.com) does not have access to view this
page. Click here to logout and change accounts. "

~~~
aaronharnly
They're just broken anchor links – intended to take you to the section
headings further down the page, I think.

------
notastartup
Not sure if I understand the technical jargon in the article, can someone tell
me what the implication of this LLVM engine is?

Will we finally see cross platform Javascript mobile apps that runs like
native apps?

