Pierre-Mikael Legris <[EMAIL PROTECTED]> writes:

> I made some benchmarks between php and mod_dtcl
> well we are the winner of the contest except on the "table" test.

Hrm... odd...  I used something similar and Tcl seemed faster...

Try this instead:

proc tableproc { } {
set i 1
while { $i <= 8 } {
  hputs "<tr>\n"
  for {set j 1} {$j <= 8} {incr j} {
  set num [ expr $i * $j * 4 - 1]
    hputs [ format "<td bgcolor=%2x%2x%2x > $num $num $num </td>\n" $num $num $num ]
  }
  incr i
  hputs "</tr>\n"
}
}
tableproc

Apparently, putting stuff inside procs speeds up Tcl significantly.

> http://tcl.perki.org/Benchmarks/Benchmarks.ttml
> 
> You can download the whole directory at: http://tcl.perki.org/Benchmarks0602.tgz
> 
> Please submit any ideas

Thanks to someone (ahem;-), ab can output HTML formatted tables with
the '-w' option, should you care to print things that way...

Thanks... I'll probably link these from tcl.apache.org:-)
-- 
David N. Welton
     Personal:           http://www.efn.org/~davidw/  
Free Software:           http://people.debian.org/~davidw/
   Apache Tcl:           http://tcl.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to