Mad, Beautiful Ideas
Book Review: High Performance JavaScript

I've been reading the writings of Performace guru's like High Performance JavaScript's Nicholas Zakas and Steve Souders for several years. It was in part because of their writings, and the fact that Nicholas has worked on core parts of YUI that helped draw me to that library during it's 2.x series, and has made me exceedingly pleased with the 3.x series. And I've read Souders' book, High Performance Web Sites, which I'd found pretty fantastic as well.

High Performance JavaScript is, as the name implies, a focused book, specifically covering JavaScript, but it goes into a delicious level of detail on the topics that it covers, from the best way to load code, to accessing data, to string manipulation. These chapters are filled with hard data detailing what methods work best in which browsers, which is a huge deal when deciding the best overall solution based on your userbase.

Plus, the book addresses the coming changes in Web Standards with the older information. For instance, in the chapter on Responsive Interfaces, the bulk of the chapter talks about the techniques you can use to break up tasks for to keep the UI thread free to respond to the user. However, there are still a few pages devoted to the Web Workers stuff that's showing up in Browsers which stands to revolutionize background threading.

And Nicholas also reaches out to others on the topics that he feels they're better qualified to address. For instance, the Strings and Regular Expressions chapter was contributed by Steve Levithan. Actually, this chapter kicks ass regardless of what language you're using. It's generally great advice on how to avoid backtracking and defining bail-early Regexs that can save you a ton of execution time, though this being a JavaScript book, there is plenty of low-level nitty-gritty JavaScript stuff that he shows you to keep in mind. I have Steve's Regular Expressions Cookbook, and after reading this chapter, I'm thinking it would be an awesome book to just read. But then, I love regex.

A fair amount of the material in the book was stuff I already knew. Still, the content, the deep dives into why something is, and the metrics to back up the assertions are fantastic, and even if you've done a lot of JavaScript over the years, there is probably something to walk away from. The fact that nearly half the book was written by contributing authors shows just how complex and nuanced many of the topics are, and that collaboration has made this book a lot stronger.

This is not a book for beginners, but for anyone else doing JavaScript, they're bound to get something useful out of this book, or something that they'll be able to refer to later. I'm glad to have this book in my digital bookshelf, and I'm sure you will be as well.