Created
October 18, 2016 08:39
-
-
Save cevek/327e09988c84c52f0ec29602bb259257 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function abc(fn, iter, arg) { | |
var name = getName(fn); | |
console.time(name); | |
for (var i = 0; i < iter; i++) { | |
fn(arg); | |
} | |
console.timeEnd(name); | |
} | |
function getName(fn) { | |
return fn.name; | |
} | |
function test1() { | |
} | |
abc(test1, 1000000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment