Nezir Zahirovic
Nezir Zahirovic

How JavaScript works: Optimizing the V8 compiler for efficiency

Forget about insignificant millisecond improvements: mis-using object properties can lead to a 7x slowdown of a simple one-liner.Given Javascript’s ubiquity across all levels of the software stack (a la MEAN or replacements 1, 2, 3,) insignificant slowdowns can plague any if not all levels of your infrastructure — not just your website’s menu animation.There are a number of ways to write more efficient Javascript, but in this article we’ll focus on Javascript optimization methods that are compiler-friendly, meaning the source code makes compiler optimizations easy and effective.We’ll narrow our discussion to V8 — the Javascript engine that powers Electron, Node.js, and Google Chrome. To understand compiler-friendly optimizations, we first need to discuss how Javascript is compiled.


How JavaScript works: Optimizing the V8 compiler for efficiency #javascriptba #javascript #nodejs #reactjs #angularjs #vuejs #meteorjs #typecscript #jquery #emberjs #bosnia