jQuery Concatenazione (v15)

Revision 15 of this benchmark created on


Description

Tests whether chaining jQuery function calls is noticeably faster than separate calls.

Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div id="esempio">Un po di testo</div>

Setup

var d = $('#esempio');

Test runner

Ready to run.

Testing in
TestOps/sec
Concatenazione
$('#esempio').addClass('test').removeClass('test');
ready
Chiamate Separate
$('#esempio').addClass('test');
$('#esempio').removeClass('test');
ready
Chiamate Separate con Cache
d.addClass('test');
d.removeClass('test');
ready

Revisions

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