Over a million developers have joined DZone.

Optimization Killers

· Performance Zone

Discover 50 of the latest mobile performance statistics with the Ultimate Guide to Digital Experience Monitoring, brought to you in partnership with Catchpoint.

Here's a neat resource: Githubber bergus took a careful look at some Javascript optimization killers, particularly with respect to the V8 engine. 

In V8 there is no interpreter but there are 2 different compilers: generic and optimizing. That means your Javascript is always compiled and run directly as native code. That means it's fast, right? Wrong. Code being compiled to native code by itself isn't hugely significant for performance. It just removes interpreter overhead but the code will still be slow if not optimized.

Bergus outlines some ways to avoid missing optimization when coding, including tooling, finding workarounds in your code, working with arguments and avoiding certain functions that are unoptimizable in V8. 

Although the article only address one engine and does not consider working in browsers other than Chrome, it provides some helpful food for thought when approaching Javascript optimization in other places as well.

Check it out on Github.

Is your APM strategy broken? This ebook explores the latest in Gartner research to help you learn how to close the end-user experience gap in APM, brought to you in partnership with Catchpoint.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}