Created
April 25, 2015 07:19
-
-
Save gtklocker/9985a0ca1c9e90fa74c7 to your computer and use it in GitHub Desktop.
Timing wtf
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 before = +new Date(); | |
| console.log("execution took", +new Date() - before, "ms"); | |
| // execution took 13 ms |
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
| import time | |
| before = time.time() * 1000 | |
| print "execution took %f ms" % (time.time() * 1000 - before) | |
| # execution took 0.003906 ms |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment