Spark vs. jQuery (v5)

Revision 5 of this benchmark created by TeMc on


Description

A test between my library, Spark (sparkjs.co.uk), Mootools and jQuery.

Preparation HTML

<script src="http://ajax.googleapis.com/ajax/libs/mootools/1.3.0/mootools-yui-compressed.js"></script><script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script><script src="http://sparkjs.co.uk/assets/downloads/Spark-v2.3.8.min.js"></script>
<ul>
    <li>A list item</li>
    <li>A list item</li>
    <li>A list item</li>
    <li>A list item</li>
    <li>A list item</li>
    <li>A list item</li>
</ul>
<script>
  jQuery.noConflict();
  Spark.noConflict();
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery
jQuery('ul li').css({
 color: '#CCCCCC',
 fontWeight: 'bold',
 fontSize: '10px'
}).click(function(e) {
 console.log(e.target.innerHTML);
});
ready
Spark
Spark('ul li').css({
 color: '#CCCCCC',
 fontWeight: 'bold',
 fontSize: '10px'
}).event('click', function(e) {
 console.log(e.target.innerHTML);
});
ready
Mootools
$$('ul li').setStyles({
 color: '#CCCCCC',
 fontWeight: 'bold',
 fontSize: '10px'
}).addEvent('click', function(e) {
 console.log(e.target.innerHTML);
});
ready

Revisions

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

  • Revision 1: published by Oliver Caldwell on
  • Revision 3: published by Oliver Caldwell on
  • Revision 4: published by Oliver Caldwell on
  • Revision 5: published by TeMc on