Created
February 1, 2016 17:58
-
-
Save 1st1/37d928f1e84813bf1c44 to your computer and use it in GitHub Desktop.
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
import time | |
class F: | |
def __init__(self): | |
self.a = 1 | |
self.b = 2 | |
self.c = 3 | |
self.d = 4 | |
self.e = 5 | |
self.f = 6 | |
self.g = 7 | |
def sub(f): | |
f.a | |
f.b | |
f.c | |
f.d | |
f.e | |
f.f | |
f.g | |
def test(): | |
f = F() | |
t = time.monotonic() | |
for _ in range(10**8): | |
sub(f) | |
print(time.monotonic() - t) | |
test() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment