You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_dtcl@tcl.apache.org by Pierre-Mikael Legris <pl...@fbwww.epfl.ch> on 2001/02/06 17:28:21 UTC

Benchmarks between php4 and mod_dtcl

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

http://tcl.perki.org/Benchmarks/Benchmarks.ttml

You can download the whole directory at: http://tcl.perki.org/Benchmarks0602.tgz

Please submit any ideas

Perki

-------------------------------------------------
This mail sent through IMP: imap.epfl.ch

Re: Benchmarks between php4 and mod_dtcl

Posted by "David N. Welton" <da...@apache.org>.
Pierre-Mikael Legris <pl...@fbwww.epfl.ch> 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