summaryrefslogtreecommitdiff
path: root/bench/bench.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2010-04-20 06:00:36 +0000
committerSteven Knight <knight@baldmt.com>2010-04-20 06:00:36 +0000
commit8a3e19c85c853ad7ee45b45e4afb63a617946145 (patch)
treed3f8269d0e8c1d76786aa3a415ba616b18c5d04e /bench/bench.py
parent7cc7b7c437b79c27354859b1d81f8338a6ce7a2d (diff)
downloadscons-git-8a3e19c85c853ad7ee45b45e4afb63a617946145.tar.gz
Rewrite uses of reduce(), which is being deprecated for Python 3.x.
Diffstat (limited to 'bench/bench.py')
-rw-r--r--bench/bench.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bench/bench.py b/bench/bench.py
index 2acc29f8f..a839ed65a 100644
--- a/bench/bench.py
+++ b/bench/bench.py
@@ -110,7 +110,9 @@ def timer(func, *args, **kw):
return results
def display(label, results):
- total = reduce(lambda x, y: x+y, results, 0.0)
+ total = 0.0
+ for r in results:
+ total += r
print " %8.3f" % ((total * 1e6) / len(results)), ':', label
for func in FunctionList: