From 186070aedc2fc45ac8d6cb5762c0de9af1855ba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Fri, 13 Dec 2019 19:25:32 +0100 Subject: Minor speed-ups --- solutions/py/d13.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'solutions/py/d13.py') diff --git a/solutions/py/d13.py b/solutions/py/d13.py index 78fc423..88b0fa2 100644 --- a/solutions/py/d13.py +++ b/solutions/py/d13.py @@ -105,7 +105,7 @@ def visualize(input): while c.memory[c.pointer] != 99: if c.wants_input: - time.sleep(0.005) + time.sleep(0.01) frame_n += 1 frame, points, ball_x, paddle_x = draw(screen, points) print(frame) @@ -127,9 +127,6 @@ if __name__ == "__main__": import cProfile _input = open("../input/13", "r").readlines() - cProfile.run("pt1(_input)") - cProfile.run("pt2(_input)") print(pt1(_input)) print(pt2(_input)) - if input("Visualize? [Y/n]: ") == "y": - visualize(_input) + #visualize(_input) -- cgit v1.2.1