Coder Social home page Coder Social logo

demystifying-js-engines's Introduction

This is a list of resources I used to learn about virtual machines in general, from an architecture point of view to optimizations and garbage collection strategies. I've also put together some parts into a talk format, you can see the video here (slides).

Contributions are very welcome!

Table of Contents generated with DocToc

Emoji Represents
πŸ“Š Blog post
πŸ“„ White paper
πŸ’» Code
🎀 Podcast
πŸŽ₯ Slides
πŸ“ Documentation

Virtual machines

JavaScript Engines

V8

JavaScriptCore

ChakraCore

SpiderMonkey

Benchmarks

Inline caches

Garbage collection

Exploitation

demystifying-js-engines's People

Contributors

a0viedo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

demystifying-js-engines's Issues

[V8] Why I+TF?

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:

[V8] About TurboFan

Acording to AWFY, V8 without Crankshaft it's not getting any closer in terms of performance. Are they planning to move all the optimizations or they act as complementary optimizing compilers?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.