Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[V8] Why I+TF? #4

Open
a0viedo opened this issue May 31, 2017 · 1 comment
Open

[V8] Why I+TF? #4

a0viedo opened this issue May 31, 2017 · 1 comment

Comments

@a0viedo
Copy link
Owner

a0viedo commented May 31, 2017

Disclaimer: This are my assumptions and I'm not based in any direct information from the team behind V8.

Why I think they made the switch to Ignition + TurboFan

In the old days, when Lars Bak was still the Team Lead on V8's team he mentioned that it was to favor simplicity to use source code as an intermediate representation (minute 38) and directly compile to native code as the first step in the pipeline. At that time it made a lot of sense and was V8's way to execute source code for many years.
I believe that the efforts that started back then with pretty much all JavaScript engines was, and for some it might still be, to compete in terms of performance with the most advanced compilers of all time. And I think for a big part they succeeded: type-specializing JIT compilers were a huge advance on JavaScript performance. For many years the most complex JavaScript engines engaged on a race for writing the best complementing JIT compilers, that's were AWFY appeared and showed that the difference between all of them was a little bit more subtle.

Fast-forward a couple of years mobile devices sums up to a few billions, making some big companies (Google among them) to think in terms of mobile first. That's what Ignition was designed to do, to play an important role in memory-constrained devices (the average mobile device). At the same time, they were re-thinking the ways on how to measure if a JavaScript engine is faster or precisely better. Suddenly it made much more sense to measure how the web is being used, to inspect and decipher how the most popular websites are built, and the premise was if you optimize for that, you would be optimizing for most common use cases.

These last moves are not necessarily a setback for C-like performance code running on a JavaScript engine because of the evolution from ASM.js to WebAssembly. Now all the browsers can share the common goal of optimizing a statically typed language, something that could be fun to watch.


Some resources to read:

@mathiasbynens
Copy link

mathiasbynens commented Jul 7, 2017

I plan to publish an article explaining Ignition + TurboFan for JavaScript developers in the near future, but until then, I think Seth’s recent presentation explains it quite well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants