PubSub libs comparison (v2)

Revision 2 of this benchmark created by TecHunter on


Preparation HTML

<script src="http://arbiterjs.com/Arbiter.js"> </script>

<script src="https://rawgit.com/TecHunter/pubsubJS/master/pubsub.js"></script>
<script src="https://rawgit.com/mroderick/PubSubJS/master/src/pubsub.js"></script>

Setup

var cb = function() {};
  
  [ps, Arbiter].map(function(fn){
  fn.subscribe('/aaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbb/ccccccccc', cb);
  fn.subscribe('/aaaaaaaaaaaaaaaa/bbbbdbbbbbbbbbbbb/ccccccccc', cb);
  fn.subscribe('/aaaaaaaaaaaaaaaa/bbbbbbsbbbbbbbbbb/ccccccccc', cb);
  fn.subscribe('/aaaaaaaaaaaaaaaa/bbbbfbbbbbbbbbbbb/ccccccccc', cb);
  fn.subscribe('/aaaaaaaaaaaaaaaa/bbbbvbbbbbbbbbbbb/ccccccccc', cb);
  fn.subscribe('/aaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbb/*', cb);
  fn.subscribe('/aaaaaaaaaaaaaaaa/bbbbdbbbbbbbbbbbb/*', cb);
  fn.subscribe('/aaaaaaaaaaaaaaaa/bbbbbbsbbbbbbbbbb/*', cb);
  fn.subscribe('/aaaaaaaaaaaaaaaa/bbbbfbbbbbbbbbbbb/*', cb);
  fn.subscribe('/aaaaaaaaaaaaaaaa/bbbbvbbbbbbbbbbbb/*', cb);
  });
  
  PubSub.subscribe('aaaaaaaaaaaaaaaa.bbbbbbbbbbbbbbbb.ccccccccc', cb);
  PubSub.subscribe('aaaaaaaaaaaaaaaa.bbbbdbbbbbbbbbbbb.ccccccccc', cb);
  PubSub.subscribe('aaaaaaaaaaaaaaaa.bbbbbbsbbbbbbbbbb.ccccccccc', cb);
  PubSub.subscribe('aaaaaaaaaaaaaaaa.bbbbfbbbbbbbbbbbb.ccccccccc', cb);
  PubSub.subscribe('aaaaaaaaaaaaaaaa.bbbbvbbbbbbbbbbbb.ccccccccc', cb);
  PubSub.subscribe('aaaaaaaaaaaaaaaa.bbbbbbbbbbbbbbbb.*', cb);
  PubSub.subscribe('aaaaaaaaaaaaaaaa.bbbbdbbbbbbbbbbbb.*', cb);
  PubSub.subscribe('aaaaaaaaaaaaaaaa.bbbbbbsbbbbbbbbbb.*', cb);
  PubSub.subscribe('aaaaaaaaaaaaaaaa.bbbbfbbbbbbbbbbbb.*', cb);
  PubSub.subscribe('aaaaaaaaaaaaaaaa.bbbbvbbbbbbbbbbbb.*', cb);

Test runner

Ready to run.

Testing in
TestOps/sec
v1 Arbiter
Arbiter.publish('/aaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbb/ccccccccc', {});
Arbiter.publish('/aaaaaaaaaaaaaaaa/bbbbdbbbbbbbbbbbb/ccccccccc', {});
Arbiter.publish('/aaaaaaaaaaaaaaaa/bbbbbbsbbbbbbbbbb/ccccccccc', {});
Arbiter.publish('/aaaaaaaaaaaaaaaa/bbbbfbbbbbbbbbbbb/ccccccccc', {});
Arbiter.publish('/aaaaaaaaaaaaaaaa/bbbbvbbbbbbbbbbbb/ccccccccc', {});
ready
ps
ps.publish('/aaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbb/ccccccccc', {});
ps.publish('/aaaaaaaaaaaaaaaa/bbbbdbbbbbbbbbbbb/ccccccccc', {});
ps.publish('/aaaaaaaaaaaaaaaa/bbbbbbsbbbbbbbbbb/ccccccccc', {});
ps.publish('/aaaaaaaaaaaaaaaa/bbbbfbbbbbbbbbbbb/ccccccccc', {});
ps.publish('/aaaaaaaaaaaaaaaa/bbbbvbbbbbbbbbbbb/ccccccccc', {});
ready
pubsub
PubSub.publishSync('aaaaaaaaaaaaaaaa.bbbbbbbbbbbbbbbb.ccccccccc', {});
PubSub.publishSync('aaaaaaaaaaaaaaaa.bbbbdbbbbbbbbbbbb.ccccccccc', {});
PubSub.publishSync('aaaaaaaaaaaaaaaa.bbbbbbsbbbbbbbbbb.ccccccccc', {});
PubSub.publishSync('aaaaaaaaaaaaaaaa.bbbbfbbbbbbbbbbbb.ccccccccc', {});
PubSub.publishSync('aaaaaaaaaaaaaaaa.bbbbvbbbbbbbbbbbb.ccccccccc', {});
ready

Revisions

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

  • Revision 1: published by TecHunter on
  • Revision 2: published by TecHunter on