3 # Tabulate the output of Jim's bench.tcl -batch
5 # Copyright (C) 2005 Pat Thoyts <patthoyts@users.sourceforge.net>
11 set f
[open $filename r
]
12 while {[gets $f data
] >= 0} {
13 lappend versions
[lindex $data 0]
14 set results
[lindex $data 1]
15 foreach {title
time} $results {
16 lappend bench
($title) $time
21 puts "Jim benchmarks - time in milliseconds"
22 puts -nonewline [string repeat
" " 21]
24 puts -nonewline [format "% 6s " $v]
28 foreach test
[lsort [array names bench
]] {
29 puts -nonewline "[format {% 20s} $test] "
30 foreach v
$bench($test) {
34 puts -nonewline [format "% 6d " $v]
41 if {!$tcl_interactive} {
42 set r
[catch {eval [linsert $argv 0 main
]} res
]