jquery_vs_purestyle_set_performance (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div id="testContainer">
</div>

Test runner

Ready to run.

Testing in
TestOps/sec
native
var cont = document.getElementById('testContainer');
cont.style.height = 100 + 'px';
cont.style.width = 200 + 'px';
ready
jQuery
$('#testContainer').css({
  'height': "100px",
  'width': "200px"
});
ready
native bgColor
var cont = document.getElementById('testContainer');
cont.style.backgroundColor = '#00FF00';
ready
jQuery bgColor
$('#testContainer').css('background-color', '#00FF00');
ready
add css
$('#testContainer').css('height', "100px" ).css('width', "200px");
ready

Revisions

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