Browser Diet jQuery vs Javascript Performance Text (v6)

Revision 6 of this benchmark created by Yura on


Description

We'll modify an element's text and then change a couple CSS properties.

Preparation HTML

<div id="text">Let's change this text</div>

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

<script>
var $el = $( document.getElementById('text') );
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery
$el.text('The text is changed');
ready
Javascript
$el.get(0).innerHTML = 'The text is changed';
ready

Revisions

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