Created
November 16, 2020 12:06
-
-
Save prerakmody/2104d0bb5f0412361afee1a3902db5a1 to your computer and use it in GitHub Desktop.
Timing Code Snippets
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
def test(num1, num2): | |
return num1/num2 | |
num = 1 | |
den = 2 | |
import timeit | |
t = timeit.timeit(lambda: test(num, den), number=5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment