jQuery Cache / No-Cache (v12)

Revision 12 of this benchmark created on


Description

Comparasion between jQuery (with or without caching) and plain / vanilla JavaScript - http://ben.nyben.net

Preparation HTML

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

<div id="test">HELLO</div>

Setup

var $el = $('#test');

Test runner

Ready to run.

Testing in
TestOps/sec
jQuery Cache
$el.width('100px');
$el.width('200px');
$el.width('300px');
$el.width('400px');
$el.width('500px');
$el.width('600px');
ready
jQuery No-Cache
$('#test').width('100px');
$('#test').width('200px');
$('#test').width('300px');
$('#test').width('400px');
$('#test').width('500px');
$('#test').width('600px');
ready
jQuery .css (cached EL)
$el.css('width', '100px');
$el.css('width', '200px');
$el.css('width', '300px');
$el.css('width', '400px');
$el.css('width', '500px');
$el.css('width', '600px');
ready
jQuery .css (No cache EL)
$('#test').css('width', '100px');
$('#test').css('width', '200px');
$('#test').css('width', '300px');
$('#test').css('width', '400px');
$('#test').css('width', '500px');
$('#test').css('width', '600px');
ready

Revisions

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