O'Reilly logo

Deploying Node.js by Sandro Pasquali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Taming V8 and optimizing performance

V8 manages Node's main process thread. When executing JavaScript, V8 does so in its own process, and its internal behavior is not controlled by Node. However, we can write JavaScript in a way that helps V8 achieve optimal compilation results. In this section, we'll focus on how to write efficient JavaScript and take a look at special configuration flags we can pass to V8 that help with keeping our Node process fast and light.

Tip

The version of V8 used by your Node installation can be viewed by typing the following:

node –e "console.log(process.versions.v8)"

Optimizing JavaScript

The convenience of a dynamic language is in avoiding the strictness that compiled languages impose. For example, you need not explicitly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required