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 vs applied vs called vs protod (v23) Revision 23 of this benchmark created by dan on May 15, 2014 Preparation HTML <script >
function add ( num ) {
this .age .val += num; }
function get_protod ( func, self ) {
var n = Object .create (self);
n.func = func;
return function (arg ){
n.func (arg); } }
function get_closured ( func, self ) {
return function ( arg ) {
self.func = func;
self.func ( arg );
delete self.func ; } }
function get_applied ( func, self ) {
return function ( ) {
func.apply ( self, arguments ); } }
function get_called ( func, self ) {
return function ( arg ) {
func.call ( self, arg ); } }
function get_bound ( func, self ) {
return func.bind ( self ); }
</script >
Setup obj = { age : { val : 0 } };
closured = get_closured ( add, obj );
bound = get_bound ( add, obj );
called = get_called ( add, obj );
applied = get_applied ( add, obj );
protod = get_protod ( add, obj );
Test runner Ready to run.
Run Quick Run Testing in Test Ops/sec Closured closured ( 10 );
ready
Bound bound ( 10 );
ready
Called called ( 10 );
ready
Applied applied ( 10 );
ready
Protod protod ( 10 );
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