From d7187d426cff3fd0468eed1cbdd1c1639c292917 Mon Sep 17 00:00:00 2001 From: Tommaso Thea Cioni Date: Thu, 22 Aug 2019 03:11:51 +0200 Subject: [PATCH] Cleaned up two tests. --- tests/benchmarks/perf_add.py | 3 --- tests/benchmarks/perf_fib.py | 8 +++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/benchmarks/perf_add.py b/tests/benchmarks/perf_add.py index 724c2fb267..e2846ed4e8 100644 --- a/tests/benchmarks/perf_add.py +++ b/tests/benchmarks/perf_add.py @@ -1,11 +1,8 @@ j = 0 while j < 1000: - total = 0 i = 0 while i < 100: total += i i += 1 - # print(total) - j += 1 diff --git a/tests/benchmarks/perf_fib.py b/tests/benchmarks/perf_fib.py index 8c508fd063..89ede85179 100644 --- a/tests/benchmarks/perf_fib.py +++ b/tests/benchmarks/perf_fib.py @@ -1,17 +1,15 @@ def fib(n): - # a, b = 1, 1 a = 1 b = 1 - for _ in range(n-1): + for _ in range(n - 1): temp = b - b = a+b + b = a + b a = temp - #a, b = b, a+b return b print(fib(1)) print(fib(2)) print(fib(3)) print(fib(4)) -print(fib(5)) +print(fib(5)) \ No newline at end of file