Tclのベンチマーク

Tclの性能ってどんなものなんでしょうか? 他の言語に比べて優れているのか劣っているのか興味のある方は、
shootoutのサイトを覗いてみるとよいでしょう。ここには、31種類の言語のベンチマークの結果があります。 この結果から、Tclは22位で「中の下」といったところでしょうか?
テスト項目の一覧とTclの得意、不得意な項目も参考になります。
Tcl8.4で更に性能に磨きがかかることに期待しましょう。

Tclベンチマークの結果

性能改善の結果、Tcl/Tk 8.4a4は、Tcl/Tk8.0.5から20%以上高速になっているそうです。

最も簡単に使えるスクリプト言語比較

OOP拡張のベンチマーク

comp.lang.tclにTclの5つのOOP(オブジェクト指向プログラミング)拡張のベンチマークが流れていました。
この結果から、XOTclの性能が最も良く、Stooopのメモリ消費量が最も少ないことがわかります。
以下に全文を引用します。
Here is an comparison between a few Tcl OO-extensions (XOTcl, OTcl,
itcl, stoop, and classytcl) in terms of performance and memory
consumption. These tests were performed with XOTcl 0.9.1 on a Pentium
III Notebook with 600 MHz under RedHat Linux 7.0. The full test with
all sources can be found on the
download page of www.xotcl.org

best regards
-gustaf neumann
================================================================================
These are the usual two shootout
(http://www.bagley.org/~doug/shootout/)
tests:

XOTcl
  methcall:  2.040u 0.010s 0:02.05 100.0%       0+0k 0+0io 283pf+0w
  objinst:   4.760u 0.020s 0:04.77 100.2%       0+0k 0+0io 283pf+0w
OTcl
  methcall:  4.060u 0.000s 0:04.05 100.2%       0+0k 0+0io 330pf+0w
  objinst:   9.250u 0.010s 0:09.26 100.0%       0+0k 0+0io 330pf+0w
itcl
  methcall:  3.130u 0.000s 0:03.13 100.0%       0+0k 0+0io 285pf+0w
  objinst:   5.300u 0.000s 0:05.29 100.1%       0+0k 0+0io 286pf+0w
stooop
  methcall:  6.430u 0.030s 0:06.84 94.4%        0+0k 0+0io 259pf+0w
  objinst:   13.720u 0.020s 0:14.45 95.0%       0+0k 0+0io 259pf+0w
classytcl
  methcall:  3.040u 0.020s 0:03.05 100.3%       0+0k 0+0io 284pf+0w
  objinst:   9.030u 0.030s 0:09.67 93.6%        0+0k 0+0io 284pf+0w
================================================================================
This test measures the memory consumption (in bytes) of objects based
on the
figures reported by /bin/ps. These figures contain everything that
is allocated withing Tcl as well (e.g. command structures, namespaces,
etc). e.g. 10000 xotcl objects consume roughly 2 MB of memory.

creating 10000 objects
itcl
   Used memory: 3002368
   Memory per itcl object: 300
   Time per object: 33

otcl
   Used memory: 2777088
   Memory per otcl object: 277
   Time per object: 71

XOTcl
   Used memory: 2109440
   Memory per xotcl object: 210
   Time per object: 40

ClassyTcl
   Used memory: 1753088
   Memory per classy tcl object: 175
   Time per object: 17

Stooop
   Used memory: 1236992
   Memory per stooop object: 123
   Time per object: 95