Skip to content

Commit 71b704a

Browse files
authored
Fix sqlglot normalize benchmark
Conjunction string is changing in every iteration. Now, conjunction string is created for every iteration.
1 parent 1d9261a commit 71b704a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyperformance/data-files/benchmarks/bm_sqlglot/run_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ def bench_optimize(loops):
156156

157157
def bench_normalize(loops):
158158
elapsed = 0
159-
conjunction = parse_one("(A AND B) OR (C AND D) OR (E AND F) OR (G AND H)")
160159
for _ in range(loops):
160+
conjunction = parse_one("(A AND B) OR (C AND D) OR (E AND F) OR (G AND H)")
161161
t0 = pyperf.perf_counter()
162162
normalize.normalize(conjunction)
163163
elapsed += pyperf.perf_counter() - t0

0 commit comments

Comments
 (0)