Last active
June 7, 2017 06:33
-
-
Save kozec/a09cfd69bde13101c8ca4717b4f064af 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
from scc.actions import NoAction | |
from scc.modifiers import SmoothModifier | |
import timeit, cProfile | |
class Mapper: | |
def __init(self): | |
pass | |
def is_touched(self, what): | |
return True | |
def was_touched(self, what): | |
return True | |
m = SmoothModifier(NoAction()) | |
x = 1 | |
def test(): | |
global x | |
m.whole(Mapper(), x, 10, "A") | |
x += 1 | |
def test_prof(): | |
global x | |
while x < 10000: | |
m.whole(Mapper(), x, 10, "A") | |
x += 1 | |
print timeit.timeit(test, number = 100000) | |
# cProfile.run("print test_prof()") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment