jsPerf.app is an online JavaScript performance benchmark test runner & jsperf.com mirror. It is a complete rewrite in homage to the once excellent jsperf.com now with hopefully a more modern & maintainable codebase.
jsperf.com URLs are mirrored at the same path, e.g:
https://jsperf.com/negative-modulo/2
Can be accessed at:
https://jsperf.app/negative-modulo/2
More info: publish/subscribe on Wikipedia.
Compared:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript">
</script>
<script src="https://raw.github.com/mroderick/PubSubJS/master/src/pubsub.js" type="text/javascript">
</script>
<script src="https://raw.github.com/kuwabarahiroshi/bloody-jquery-plugins/master/pubsub.js" type="text/javascript">
</script>
<script src="https://raw.github.com/phiggins42/bloody-jquery-plugins/55e41df9bf08f42378bb08b93efcb28555b61aeb/pubsub.js" type="text/javascript">
</script>
<script src="https://raw.github.com/gist/1695338/736bcf94f9226d975fce3ad4f2bc08ccbf176bad/pubsub.js" type="text/javascript">
</script>
<script src="https://raw.github.com/appendto/amplify/master/core/amplify.core.js" type="text/javascript">
</script>
<script src="https://raw.github.com/maccman/spine/master/lib/spine.js" type="text/javascript">
</script>
<script src="https://raw.github.com/richardscarrott/ply/master/src/core.js" type="text/javascript">
</script>
<script src="https://raw.github.com/jrburke/requirejs/master/require.js" type="text/javascript">
</script>
<script type="text/javascript">
window.callback = function () {};
window.payload = {
somekey: 'some value'
};
var Observer = jQuery({});
jQuery(function() {
require(["https://raw.github.com/jkroso/Observer/master/dist/Observer.min.js"], function(Hyraki){
window.hyraki = new Hyraki()
for (var i = 0; i < 10; i++) {
Observer.on('my-event-' + i, callback);
PubSub.subscribe('my-event-' + i, callback);
jQuery.subscribe('my-event-' + i, callback);
Events.subscribe('my-event-' + i, callback);
App.subscribe('my-event-' + i, callback);
amplify.subscribe('my-event-' + i, callback);
Spine.bind('my-event-' + i, callback);
Ply.core.listen('my-event-' + i, callback);
hyraki.on('my-event-' + i, callback);
}
})
});
</script>
Ready to run.
Test | Ops/sec | |
---|---|---|
jQuery Events |
| ready |
PubSubJS |
| ready |
jQuery PubSub plugin |
| ready |
Pure JS PubSub |
| ready |
Amplify Pub/Sub |
| ready |
Spine Events |
| ready |
Ply Notify/Listen |
| ready |
hyraki.publish |
| ready |
hyraki.do |
| ready |
You can edit these tests or add more tests to this page by appending /edit to the URL.