From e749e34f07be72b9f804039d1210b4ca5b045026 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 5 Apr 2017 06:32:47 -0700 Subject: [PATCH] Provide bounds on speedup --- tools/profiling/microbenchmarks/speedup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/profiling/microbenchmarks/speedup.py b/tools/profiling/microbenchmarks/speedup.py index 9b022da0c46..ac268fb6790 100644 --- a/tools/profiling/microbenchmarks/speedup.py +++ b/tools/profiling/microbenchmarks/speedup.py @@ -43,7 +43,7 @@ def speedup(new, old): if p0 > _THRESHOLD: return 0 if s0 < 0: pct = 1 - while True: + while pct < 101: sp, pp = cmp(new, scale(old, 1 - pct/100.0)) if sp > 0: break if pp > _THRESHOLD: break @@ -51,7 +51,7 @@ def speedup(new, old): return -(pct - 1) else: pct = 1 - while True: + while pct < 101: sp, pp = cmp(new, scale(old, 1 + pct/100.0)) if sp < 0: break if pp > _THRESHOLD: break