Local variables

JavaScript performance comparison

Test case created

Info

Testing local variables performance, based on:

http://jonraasch.com/blog/10-javascript-performance-boosting-tips-from-nicholas-zakas

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Acessing global variable
var blah = document.getElementById('myID'),
blah2 = document.getElementById('myID2');
pending…
Acessing local variable
var doc = document,
blah = doc.getElementById('myID'),
blah2 = doc.getElementById('myID2');
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 comments

Add a comment