Google Chrome’s V8 JavaScript engine has now got improvements in performance and code optimizations. Recently, V8 team has come up with the V8 version 5.4, the newest branch of the engine. Till now 5.4 release is in the beta phase of development and it will take few more weeks until it gets released along with Chrome 54 Stable browser. As per the team, “V8 5.4 delivers a number of key improvements in memory footprint and startup speed. These primarily help accelerate initial script execution and reduce page load in Chrome".
Also Read : JavaScript interpreter called Ignition for V8 JavaScript Engine.
Memory consumption in V8 JavaScript engine can be measured by two important metrics, Peak memory consumption and average memory consumption. During a script execution, it is important to reduce both the types of memory consumption. If the memory consumption is not reduced then the script execution will result in Out of Memory crash even if the average memory consumption is not very high.
Memory division is actually a very good practice because it divides memory into two categories: On-heap memory and Off-heap memory. On-heap contains actual JavaScript objects whereas Off-heap contains internal data structures allocated by the compiler, parser and garbage collector.
A V8 garbage collector is tuned for devices with 512MB of RAM or less. This tuning is done to reduce peak consumption of On-heap memory by about 40 percent. It totally depends on the size of the websites being displayed. Inside JavaScript parser, memory management is simplified to avoid unnecessary allocation, reducing off-heap memory consumption by as much as 20 percent.
V8’s JavaScript parser is now streamlined and it has helped to reduce the memory consumption and besides that it has also improved parser’s runtime performance. According to the V8 team, "This streamlining, combined with other optimizations of JavaScript built-ins and how accesses of properties on JavaScript objects use global inline caches, resulted in notable startup performance gains”.
Leave a Reply
Your email address will not be published. Required fields are marked *