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 bind vs closure (v27) Revision 27 of this benchmark created on September 3, 2014 Preparation HTML <script src ="//ajax.googleapis.com/ajax/libs/dojo/1/dojo/dojo.xd.js" >
</script > <script src ="http://documentcloud.github.io/underscore/underscore-min.js" > </script >
<script >
function foo ( ) {}
</script >
Setup var binder = function (scope, method ) {
return function ( ) {
return method.apply (scope, arguments );
}
};
var self = this ;
var test = function ( ) { return this ; }
var test_bind = test.bind (self);
var test_self = function ( ) { return self; };
var test_dojo = dojo.hitch (self, test);
var test_binder = binder (self, test);
var test_underscore = _.bind (test, self);
var test_assign = test;
Test runner Ready to run.
Run Quick Run Testing in Test Ops/sec bind() test_bind ();
ready
self test_self ();
ready
dojo.hitch test_dojo ();
ready
binder test_binder ();
ready
call (control) test.call (this );
ready
underscore test_underscore ()
ready
Simple assignation test_assign ()
ready
Revisions You can edit these tests or add more tests to this page by appending /edit to the URL.
Revision 1 : published by Kris Zyp on September 14, 2012 Revision 2 : published on September 21, 2012 Revision 3 : published on September 21, 2012 Revision 4 : published on September 23, 2012 Revision 5 : published on September 24, 2012 Revision 6 : published on September 24, 2012 Revision 7 : published by Mike Wilcox on October 21, 2012 Revision 9 : published by op1ekun on January 10, 2013 Revision 10 : published by Arthur on February 14, 2013 Revision 11 : published by Denys Pavlov on July 25, 2013 Revision 12 : published on September 19, 2013 Revision 15 : published on October 10, 2013 Revision 16 : published by DrSlump on October 14, 2013 Revision 17 : published by Denys Pavlov on December 2, 2013 Revision 18 : published on February 27, 2014 Revision 20 : published on March 18, 2014 Revision 21 : published on April 2, 2014 Revision 22 : published on May 10, 2014 Revision 23 : published by dan on May 15, 2014 Revision 24 : published on June 3, 2014 Revision 25 : published on July 18, 2014 Revision 26 : published on August 26, 2014 Revision 27 : published on September 3, 2014 Revision 29 : published on October 15, 2014 Revision 30 : published on November 1, 2014 Revision 31 : published by Gary on November 8, 2014 Revision 32 : published by Aria Stewart (@aredridel) on November 30, 2014 Revision 34 : published on January 19, 2015 Revision 39 : published on June 10, 2015 Revision 40 : published on June 12, 2015 Revision 41 : published on June 17, 2015 Revision 43 : published by Max on August 26, 2015 Revision 44 : published on September 6, 2015 Revision 45 : published by random on October 2, 2015 Revision 49 : published by Paul on October 14, 2015 Revision 50 : published by evil twist on December 20, 2015 Revision 51 : published by netwjx on December 29, 2015 Revision 52 : published on January 15, 2016 Revision 54 : published on February 1, 2016