Browser Diet jQuery vs Javascript Performance Text (v12)

Revision 12 of this benchmark created by Renan Aragao 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>

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery
$('#text').html('The text is changed');
 
ready
Javascript
var text = document.getElementById('text');
ready

Revisions

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