But I have to warn you. If you know the common quote:
We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil
I dare ask you to throw that out the window, because even trivial tasks can take substantial time if not treated properly.
While we all know how to go for speed when adding child elements;
appendChild, I’m sure many weren’t aware that in the following example the second piece of code has an increased performance over the classic concatenation.
And true to the saying of someone who lived long time ago:
If you can not measure it, you can not improve it.
Nicholas doesn’t stray apart from the path and provides alongside any proposed optimization a benchmark and a diagram of the results. Although I have to accuse the book of being confusing at times, because due to many shades of gray you cannot distinctively recognize browsers. Albeit the reasoning of the benchmarks is to provide data on the optimized versions and not as a base of browser comparison, so it can be accepted…
for now. Nicholas has provided in the comments the URL for the colored versions of the charts.
Another interesting thing, that came more like a bonus to me was the chapter about multipart AJAX. Never did I use it before so it was a nice touch to provide me with some use cases I didn’t think of.
The book is solid material, and I just wished it came out earlier because right at the start of the year I had to do an DOM manipulation intensive application and with this book I could have squeezes more cycles from that code.