Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Optimization Killers

DZone's Guide to

Optimization Killers

· Performance Zone
Free Resource

Download our Introduction to API Performance Testing and learn why testing your API is just as important as testing your website, and how to start today.

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.

Find scaling and performance issues before your customers do with our Introduction to High-Capacity Load Testing guide.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

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

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}