Skip to content

Instantly share code, notes, and snippets.

@vhf
Last active October 31, 2015 15:00
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 vhf/ecd9dba814a4edd80680 to your computer and use it in GitHub Desktop.
Save vhf/ecd9dba814a4edd80680 to your computer and use it in GitHub Desktop.
suite.add('#1 no tail call', function() {
factorial1(100);
})
.add('#2 TCO/default params', function() {
factorial2(100);
})
.add('#3 TCO/no default params', function() {
factorial3(100);
})
.on('cycle', function(event) {
console.log(String(event.target));
})
.on('complete', function() {
console.log('Fastest is ' + this.filter('fastest').pluck('name'));
})
.run({ 'async': true });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment