jquery vs dojo

JavaScript performance comparison

Test case created

Preparation code

<script src="http://code.jquery.com/jquery-1.8.3.min.js">
</script>
 <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.8.2/dojo/dojo.js"></script>

<div id="container">

</div>
<div id="container2">
    <div><span class="test">0</span></div>
</div>

Preparation code output

0

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
dojoSetContent
 
    dojo.byId("container").innerHTML =  "<div><span>hello world </span></div>";      
   
pending…
jQuerySetContent
    $("#container")[0].innerHTML = "<div><span>hello world </span></div>";    
 
pending…
dojoStyle
dojo.query(".test", "container2").style("color","red" );    
pending…
jQueryStyle
$("#container2 .test").css({ color: "blue" });  
pending…
dojoEvent
dojo.query("#container2 span").on("mouseenter,mouseleave", function(e){    
        if(e.type == "mouseenter"){    
            dojo.style(e.target, "color", "blue");        
    }  
    });  
pending…
jQueryEvent
$("#container2 span").hover(function () {    
        $(this).css("color", "red");    
    }, function () {    
        $(this).css("color", "black");    
    });
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment