Created
December 19, 2019 08:29
-
-
Save i-sync/0c0a0f9d7db8d5dfd80d69c6e390df69 to your computer and use it in GitHub Desktop.
testing
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 | |
| from test1 import result as add1 | |
| from test2 import result as add2 | |
| t1 = time.time() | |
| for i in range(1000000): | |
| add1(i) | |
| t1 = time.time() - t1 | |
| print(t1) | |
| t1 = time.time() | |
| for i in range(1000000): | |
| add2(i) | |
| t1 = time.time() - t1 | |
| print(t1) |
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
| a = 10; | |
| def add(num): | |
| return num + a; | |
| def result(num): | |
| return add(num) |
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
| a = 10; | |
| class test: | |
| def add(self, num): | |
| return num + a; | |
| t = test() | |
| def result(num): | |
| #t = test() | |
| return t.add(num) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment