Skip to content

Instantly share code, notes, and snippets.

@make-github-pseudonymous-again
Last active March 29, 2021 20:10
Show Gist options
  • Save make-github-pseudonymous-again/fdcad162c501be3c2522 to your computer and use it in GitHub Desktop.
Save make-github-pseudonymous-again/fdcad162c501be3c2522 to your computer and use it in GitHub Desktop.
Poorman's benchmark
var bench = (fn, n) => {
const title = fn.name;
console.time(title);
while (n--) fn();
console.timeEnd(title);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment