Created
October 29, 2018 10:57
-
-
Save KushnerMikalai/57e2c02bbe1ef57636dcf24465abda01 to your computer and use it in GitHub Desktop.
time speed js
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
| var iterations = 1000000; | |
| console.time('Function #1'); | |
| for(var i = 0; i < iterations; i++ ){ | |
| // YOUR FUNCTION 1 | |
| }; | |
| console.timeEnd('Function #1'); | |
| console.time('Function #2'); | |
| for(var i = 0; i < iterations; i++ ){ | |
| // YOUR FUNCTION 2 | |
| }; | |
| console.timeEnd('Function #2'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment