viff

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 diff
     1.1 --- a/apps/benchmark.py	Fri Oct 16 23:31:06 2009 +0200
     1.2 +++ b/apps/benchmark.py	Fri Oct 16 23:34:11 2009 +0200
     1.3 @@ -220,10 +220,7 @@
     1.4  
     1.5  needed_data = ""
     1.6  if options.needed_data:
     1.7 -    file = open(options.needed_data, 'r')
     1.8 -    for l in file:
     1.9 -        needed_data += l
    1.10 -    needed_data = eval(needed_data)
    1.11 +    needed_data = eval(open(options.needed_data).read())
    1.12  
    1.13  if options.needed_data and options.pc:
    1.14      bases = (benchmark, NeededDataBenchmarkStrategy, operation_arity, object)