jQuery Concatenazione (v13)

Revision 13 of this benchmark created by Pierluigi Anzellotti 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>

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
var d = $('#esempio');
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.