Originally posted on freecodecamp
This is the piece of software which highly optimizes your JS code and converts it into machine code for the CPU to execute. Some of the tasks V8 handles are:
- Garbage Collection
- Compilation to Machine code
- Inline caching
- Pointer compression
- and much much more optimization
As a matter of fact, pointer compression is a very new technique in V8 to boost memory optimization while having no effect on performance. If you’re a geek, you can read more about how it is implemented on the official V8 blog.
Mature ecosystem and community
You can fire up a browser (found on 100% of personal computers), open the console, and you’ll find a JS engine waiting for you to run code! This was never the case with any other programming languages of such complexity.
As if the vast community wasn’t enough, we have the
yarn package systems. You name it and there’s a package for that on the
It’s funny, but lowkey, I believe this.
Frameworks and libraries like React, Angular, and Vue are paving the way for how future applications should be built. They’re shifting the perspective towards declarative instead of imperative programming, the what instead of how. This lets developers develop quality applications without worrying about underlying high performant code.
- Front end (Browsers)
- Back end (Node, Deno)
- Android/iOS (React Native, NativeScript, etc.)
- Desktop (Electron)
- Hybrid (Ionic)
What makes this possible? JS engines like V8 are written in C/C++ and can even be compiled on embedded systems! For other platforms, because browsers are always present (like on Andorid/iOS), they ship with a JS engine which can then be used to run any JS code, even for native apps in the case of React Native.
Bleeding edge features and advancement
You can find all the proposals here: TC39 Proposals.
The way you scale Node applications is not similar to how you’d scale a multi-threaded application. Node literally means “node” – a single node in a tree of processes. Node is scaled by running multiple instances of it and managing the cluster.