changeset 1297:0a96f8ee4bd3

benchmark: read needed_data in one go instead of line-by-line
author Martin Geisler <mg@cs.au.dk>
date Fri, 16 Oct 2009 23:34:11 +0200
parents 42f614d9acf3
children 2e11e0366d58
files apps/benchmark.py
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/apps/benchmark.py	Fri Oct 16 23:31:06 2009 +0200
+++ b/apps/benchmark.py	Fri Oct 16 23:34:11 2009 +0200
@@ -220,10 +220,7 @@
 
 needed_data = ""
 if options.needed_data:
-    file = open(options.needed_data, 'r')
-    for l in file:
-        needed_data += l
-    needed_data = eval(needed_data)
+    needed_data = eval(open(options.needed_data).read())
 
 if options.needed_data and options.pc:
     bases = (benchmark, NeededDataBenchmarkStrategy, operation_arity, object)