Google Tech Talk
June 4, 2009
ABSTRACT
Web Exponents: Speed Up Your JavaScript
Presented by Nicholas C. Zakas.
As an interpreted language, JavaScript is filled with hidden performance issues that conspire to slow down your code and ruin the user experience. Learn exactly what is fast, what is slow, and what you can do to squeeze that last bit of performance out of your JavaScript code.
Nicholas C. Zakas is the author of Professional JavaScript for Web Developers, 2nd Edition (Wrox, 2009), co-author of Professional Ajax, 2nd Edition (Wrox, 2007), and a contributor to Even Faster Web Sites (O’Reilly, 2009). Nicholas is principal front end engineer for the Yahoo! homepage and is also a contributor to the Yahoo! User Interface (YUI) library.
The Web Exponents Series is hosted by Steve Souders
Original source
25 responses to “Speed Up Your JavaScript”
So amazing, the best tech talk I've seen.
Thanks Nicholas for giving such a important key aspect of javascript.
Are the main points in the summary at 46:00 still valid today?
Very helpful insight of the internals, i liked the way Nicholas explained scope chain and reflows. Thank you.
Premature optimization is still a big thing. You generally don't have to worry about these things most of the time. Only optimize when you need to. Usually disk I/O, network, etc are the bottlenecks you have to worry about most of the time.
@34:05
addChild is supposed to be appendChild?
Excellent Session!… kudos.. keep them coming 🙂
Valuable tips and unique sense of humour.
Cool, Very Informative.
Cool.. Thanks. That helped me a lot.
scratch that. Chrome 2 beta.
the sick part is that this was 4 years ago, showing a chart with Chrome 3 beta, and I'm using Chrome 29 as we speak.
Very informative talk!
Great suggestions, didn't really think of these ideas to speed up JS.
Am I the only one hearing weird noises in the background of this video?
Really interesting speech.
I need to optimize my DOM accesses now.
You R One Of Best @Zakas…. i m your Fan ….
That's the thing. Now with JIT compilers, how relevant is this?
The DOM thing for sure didn't change but the rest…
For example, the depth navigation should not be a problem with a compiler now…
I am interested too…
Awesome talk, a great insight into the caveats of JavaScript. I have so many loops to optimise in my game now…
How much of this is still relevant with the latest JS engines? (Chrome 26, IE10, FF19…)
I knew about scope chain and the need to always declare var to stay local (otherwise it becomes a global variable and that's SLOW [not to mention being at greater risk of collision!]), but there's a LOT in this that I never knew about!
Great suggestions for the loops! Would've never thought to flip them if it wasn't for this presentation
good job.
51:30
if there are a lot of global variables (I saw >200 in some apps) it works 2-3 times faster, when grouping them into an object
Hey where did you get that profile picture from? I recognize it from another site.
Good presentation. Learned alot.