Skip to content

Instantly share code, notes, and snippets.

@mvrilo
Created December 10, 2011 14:53
Show Gist options
  • Save mvrilo/1455340 to your computer and use it in GitHub Desktop.
Save mvrilo/1455340 to your computer and use it in GitHub Desktop.
defining a function
var ben = require('ben');
var fn = ben(100000, function() {
var test = function() { return "test"; };
test();
});
var newFunction = ben(100000, function() {
var test = new Function('', 'return "test"');
test();
});
console.log('function(){}: ', fn)
console.log('new Function(): ', newFunction)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment