Direct call vs anonymous (v2)

Revision 2 of this benchmark created on


Setup

var i;
    
    function test(func) {
      i++;
    }
    
    function testAnon(func) {
      func();
    }

Test runner

Ready to run.

Testing in
TestOps/sec
Direct call
var test = document.getElementById("para1");

test;
test;
test;
ready
Anonymus call with creation
var test = document.getElementById("para1");
var test = document.getElementById("para1");
var test = document.getElementById("para1");
ready

Revisions

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