Skip to content

Instantly share code, notes, and snippets.

@jed
Created June 23, 2010 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jed/449728 to your computer and use it in GitHub Desktop.
Save jed/449728 to your computer and use it in GitHub Desktop.
var puts = require( "sys" ).puts
, contextFn = function( a ){ return a && this() }
, argFn = function( a, b ){ return b && a() }
, time;
time = +new Date;
for ( var i = 0; i < 10e6; i++ ) contextFn.call( contextFn, contextFn );
puts( "as context: " + ( +new Date - time ) );
time = +new Date;
for ( var i = 0; i < 10e6; i++ ) argFn( argFn, argFn );
puts( "as argument: " + ( +new Date - time ) );
@felixge
Copy link

felixge commented Jun 26, 2010

あなたは歓迎されて

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment