Facilitating the spread of knowledge and innovation in professional software development



Choose your language

InfoQ Homepage Presentations JavaScript: Measuring Performance, Games, and Distributed Testing

JavaScript: Measuring Performance, Games, and Distributed Testing



John Resig touches three JavaScript issues: performance measuring – calling getTime() or using a browser extension like Firebug, plus performing complexity analysis -, creating games – should be multiplayer, hard to cheat, available on all devices, and addictive –, and performing distributed testing to evaluate how a program or game works in a real set.


John Resig is a JavaScript developer and the creator of the jQuery JavaScript library. He currently works for the Mozilla Corporation where he works as a JavaScript Evangelist. He's also the creator of a number of other popular JavaScript projects including Processing.js and Env.js. He's the author of the book 'Pro JavaScript Techniques' and the upcoming 'Secrets of the JavaScript Ninja'.

About the conference

JSConf 2009 is a conference devoted to the programming language we all love to hate and hate to love, JavaScript. This is conference will be thoughtful, content driven, and exemplify the very nature of JavaScript. The core focus of this conference is to expose some of the details about JavaScript that are often overlooked and present them more as a discussion with the audience. The content of the conference should cater to all types of JavaScript users from client interfaces to server development to testing. No matter which programming language you love, you know of the pleasure and pain of JavaScript programming.

Recorded at:

Dec 23, 2009

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Call Count Profiling

    by William Louth,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Call Count Profiling ha already been done in Java. In fact counts can represent other execution constructs such as field reads/writes, object allocs....

  • Re: Call Count Profiling

    by William Louth,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    The article which was published in Mar 2008 is not available anymore but here are some excerpts.

    Micro-Tuning the Code: This approach involves scanning the code and applying standard Java micro-performance optimizations (reducing object allocation, field access, method calls, and recursion), eliminating duplication of computation across call paths (temporal caching), and using heuristics to reduce the length of call paths. With this approach it is possible to waste a lot of development time if you do not understand how the software executes and the data characteristics so you must have already a good idea of the hotspots with the software. This should should ideally be combined it with one or more of the other approaches described here.

    Micro-Benchmarking the Code: This second approach involves creating a benchmark and iteratively changing a small part of the code then measuring the change across test runs. A problem with this approach is that you can easily be lead astray by your desire to beat the clock and tune specifically for benchmark. So you must be careful to make trade-offs within the software that improve the efficiency of the software under normal operating conditions whilst not creating extreme worst cases for deviations in execution.

    Counting the Code: With the third approach I use what I learnt early on in my algorithm studies of simply counting and weighting the instructions (not necessarily byte code) executed during processing and determining how this count changes depending on the branches in the code taken which can be dependent on object state. This is a much harder approach especially as I previously did most of this by visualizing the execution in my mind and maintaining accumulators based on costs assigned to language constructs and operations. After two weeks of doing this intensely you’ll begin to think you are Neo so I created a solution....

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p