Skip to content

Commit 2687a58

Browse files
committed
change to new range based functions
1 parent 8206766 commit 2687a58

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

benchmark/bm_baseline.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22

33
result = 0
44
iterations = int(sys.argv[1])
5-
iteration_list = list(range(iterations))
65

7-
for i in iteration_list:
6+
for i in range(iterations):
87
result += 1
98

109
assert(result == iterations)

benchmark/bm_simplefunc.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
'''
2-
Created on 04.10.2019
3-
4-
@author: gocht
5-
'''
61
import sys
72

83

@@ -12,9 +7,8 @@ def add(val):
127

138
result = 0
149
iterations = int(sys.argv[1])
15-
iteration_list = list(range(iterations))
1610

17-
for i in iteration_list:
11+
for i in range(iterations):
1812
result = add(result)
1913

2014
assert(result == iterations)

0 commit comments

Comments
 (0)