Skip to content

Latest commit

 

History

History
55 lines (36 loc) · 4.39 KB

File metadata and controls

55 lines (36 loc) · 4.39 KB

JavaScript

🔧 Engine & VM JavaScript (V8 etc)

When you are more comfortable with JavaScript it will be necessary to study a minimum the functioning of modern engines like V8, JS Core, SpiderMonkey etc (they are responsible for interpreting and executing your JavaScript code whether in Node.js or even in the browser).

This is clearly not an investment within the reach of a beginner but rather an intermediate or experienced developer 📚. To be able to better understand how your code will be managed and optimized it will therefore be necessary for you to learn the workings of the machine 😈.

Among the articles I strongly recommend you to read:

There are dozens of equally fascinating articles that I have taken the trouble to gather here: https://github.com/fraxken/VM-Resources

A few more talks for your enjoyment:

 

😡 The dangerous hype of benchmarks

I think it's important to address the topic of benchmarks while we're in the engine JS section. Developers love to use them as an argument to justify various choices or ideologies 😰...

The problem is that most of the time these benchmarks are completely messed up and/or are not representative of a production workload 😂. Even if they are concrete you will need experience to deduce conclusions (and still nothing says that the concern concerns you otherwise).

Here are some articles to awaken you to the subject:

As hard as it may be to hear, I think that someone without a solid knowledge of how JavaScript engines work has no legitimacy to make conclusions based on benchmark results 💥.

“The hardest thing of all is to find which operation is more expensive inside the darkness of VM, especially when no operation is performed.” (Vyacheslav Egorov)

And even people with a lot of experience (including the contributors to the engines themselves) are always in doubt and prefer to take a pinch of salt for each of their conclusions. That's how difficult it is... whether you're going to do for-in, for-of or .forEach is not really relevant here.

“ 👉 Premature optimization is the root of all (or at least most) evils in programming..” (Donald Knuth)


⬅️ 🌌 Online courses, talks and articles | ➡️ ⚡ ECMAScript: JavaScript or ECMAScript ?