mroderick-PubSubJs Vs ifandelse-PostalJs
JavaScript performance comparison
Info
Comparing the subscribe speeds of mroderick/PubSubJs Vs ifandelse/PostalJs
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://raw.github.com/mroderick/PubSubJS/master/src/pubsub.js"></script>
<script src="https://raw.github.com/ifandelse/postal.js/master/example/standard/js/underscore.js"></script>
<script src="https://raw.github.com/ifandelse/postal.js/master/example/standard/js/postal.js"></script>
<script>
Benchmark.prototype.setup = function() {
var mroderick = PubSub;
var ifandelse = postal;
var sub1;
var sub2;
};
Benchmark.prototype.teardown = function() {
if(sub1) {
mroderick.unsubscribe(sub1);
}
if(sub2) {
sub2.unsubscribe();
}
};
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
mroderick pubsub |
|
pending… |
ifandelse postaljs |
|
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 Lucas Martin
- Revision 2: published by Lucas Martin
- Revision 3: published by Lucas Martin
- Revision 4: published
0 comments