Last active
December 13, 2017 12:56
-
-
Save anshumanv/4bab1ac978bd729bbf055f35d9bcdeef to your computer and use it in GitHub Desktop.
This file contains 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
const timeTaken = (func,...args) => { | |
var t0 = performance.now(), r = func(...args); | |
console.log(performance.now() - t0); | |
return r; | |
} | |
// timeTaken(Math.pow, 2, 10) -> 1024 (0.010000000009313226 logged in console) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment