jquery plugin adapter
JavaScript performance comparison
Preparation code
<script src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script>
Benchmark.prototype.setup = function() {
var count = 100;
var htmlArr = [];
for(var i = 0; i < count; i++) {
htmlArr.push('<div id="'+ i +'">'+ i +'</div>');
}
$('body').append(htmlArr.join(''));
function SimpleJquery() {
var jQuery = $.sub();
(function($){
$.fn.abc = function(){};
})(jQuery);
return function(){return $.apply(null, arguments);}//jQuery;
}
var simpleJquery = SimpleJquery();
(function($){
$.fn.abc = function(){};
})(jQuery);
};
</script>
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
jquery-plugin-adapter |
|
pending… |
jquery-plugin |
|
pending… |
Compare results of other browsers
Revisions
You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:
- Revision 1: published by chx007
- Revision 2: published by chx007
- Revision 3: published by chx007
0 comments