Get the latest tech news

Optimizing JavaScript for Fun and for Profit


romgrk's personal blog

A note on terminology I have used the word “shape” for this concept, but be aware that you may also find “hidden class” or “map” used to describe it, depending on the engine. If you’ve payed attention sooner, you will realize that the engine will specialize the function for the shape{ type: string, count: number }. The deoptexplorer-vscode extension allows you to load V8/chromium log files to understand when your code is triggering deoptimizations, such as when you pass different shapes to a function.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Fun

Fun

Photo of javascript

javascript

Photo of profit

profit

Related news:

News photo

Delivering Signals for Fun and Profit (2001)

News photo

Exploring Randomness in JavaScript

News photo

Create HTML/ZIP/PNG Polyglot Files in JavaScript