Re: Is there already a "sourcecode to optimized converter" for tcl?



Michael Reichenbach wrote:
I wanted to optimize my scripts and already tested already
tclpro/activestate tcl compiler but got really disappointed, the
improvement was more then minimal. The bytecode hides the source but
this is not my point, I wanted to speed up things.

As Arcis already noted, the Tcl Dev Kit Compiler is a precompiler for obfusacation purposes - it is not intended for to improve performance, and it doesn't advertise itself that way (although I understand that "Compiler" means different things to different people).

I can imagine that this (=good readable for me)
...
is slower then this (="optimized")

proc testproc {n args} {puts $n;puts $args};proc nextproc {n args} {puts
$n;puts $args}

That is not correct. One byte-compiled, the whitespace is irrelevant. Arcis already provided several pointers, but one page to look at is http://wiki.tcl.tk/1611. It's a benchmark page, but you'll notice that some of the benchmarks are improved through alternate coding methods for the same purpose.

Jeff
.



Relevant Pages

  • Re: 4^2... Another mad idea (was Re: Denesting)
    ... > in code size and up to 50% reduction in execution time. ... > in the classical compiler literature. ... not as a toy or a synthetic benchmark. ... I know about Bruce Hoyt's solver. ...
    (comp.lang.forth)
  • Re: sched_domains and Stream benchmark
    ... > performance of the Opteron NUMA sched-domains scheduler. ... > reproduce your results and am struggling with the benchmark. ... compiled with the PGI compiler. ... of fork/clonebalancing, against 2.6.5-rc3-mm1. ...
    (Linux-Kernel)
  • Re: CPU speed
    ... > trivial and dependant on the quality and optimization of the C compiler. ... The OP has already spent a lot of time with both Sun and Oracle ... So he's trying to find a *simple* benchmark which shows just the CPU ...
    (comp.unix.solaris)
  • benchmarking (was Re: GFA-Basic 32 free download)
    ... CPU and clock rate on which the benchmark was run. ... The fastest compiler on the slowest machine would be a lot ...
    (comp.lang.basic.misc)
  • Re: CPU speed
    ... >>trivial and dependant on the quality and optimization of the C compiler. ... OK, the benchmark is bad, but it's not enough ... > I suggested -O2 and volatile int cnt so that the gcc effects on different ... here is that C program compiled with gcc 3.3.2 ...
    (comp.unix.solaris)