Base vs BaseCore
JavaScript performance comparison
Preparation code
<script src="http://yui.yahooapis.com/combo?3.8.1/build/yui-base/yui-base-min.js&3.8.1/build/oop/oop-min.js&3.8.1/build/attribute-core/attribute-core-min.js&3.8.1/build/event-custom-base/event-custom-base-min.js&3.8.1/build/event-custom-complex/event-custom-complex-min.js&3.8.1/build/attribute-observable/attribute-observable-min.js&3.8.1/build/attribute-extras/attribute-extras-min.js&3.8.1/build/attribute-base/attribute-base-min.js&3.8.1/build/base-core/base-core-min.js&3.8.1/build/base-observable/base-observable-min.js&3.8.1/build/base-base/base-base-min.js&3.8.1/build/pluginhost-base/pluginhost-base-min.js&3.8.1/build/pluginhost-config/pluginhost-config-min.js&3.8.1/build/base-pluginhost/base-pluginhost-min.js&3.8.1/build/base-build/base-build-min.js"></script>
<script src="http://jetjs.herokuapp.com/combo?jet.min.js&base.min.js"></script>
<script>
var Y = YUI().use('base');
function Foo() {
Foo.superclass.constructor.apply(this, arguments);
}
Y.extend(Foo, Y.Base, null, {
ATTRS: {
bar: {
value: 'bar'
},
baz: {
value: 'baz'
}
}
});
function FooCore() {
FooCore.superclass.constructor.apply(this, arguments);
}
Y.extend(FooCore, Y.BaseCore, null, {
ATTRS: {
bar: {
value: 'bar'
},
baz: {
value: 'baz'
}
}
});
jet().use('base', function ($) {
function FooJet() {
FooJet.superclass.constructor.apply(this, arguments);
}
$.extend(FooJet, $.Base, null, {
ATTRS: {
bar: {
value: 'bar'
},
baz: {
value: 'baz'
}
}
});
window.FooJet = FooJet;
});
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Base |
|
pending… |
BaseCore |
|
pending… |
jet |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments