Added debug output
This commit is contained in:
parent
585016e9d8
commit
959f74e34f
1 changed files with 3 additions and 0 deletions
|
@ -204,6 +204,9 @@ def main():
|
|||
size = int( argv[1])
|
||||
except Exception:
|
||||
size= 1000
|
||||
|
||||
print("Benchmarking using %d elements" % size)
|
||||
|
||||
result = SortTester(list( SortAlgorithm.__subclasses__() )).test(size=size)
|
||||
for cls, r in sorted(result.items(),key=lambda e: e[1][0]+e[1][1]):
|
||||
print("%-12s: %10d, %10d compares, %10d swaps" % (cls.__name__, r[0]+r[1], r[0],r[1]))
|
||||
|
|
Loading…
Reference in a new issue