Created
June 1, 2021 18:20
-
-
Save gaurangrshah/ac98e0624db93483b9c0ab87db8eddcf to your computer and use it in GitHub Desktop.
use to test the performance of the execution of any function or method.
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
const begin = performance.now(); | |
// include the operation you want to measure: | |
for let(i = 0; i < 100; i++) { | |
console.log(i); | |
} | |
const end = performance.now(); | |
const timeElapsed = end - begin; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment