Re: binary tcl scripts? is it possible? is it faster ?



Usman Muzaffar wrote:
>
> "Walid" <walid.benyoussef@xxxxxxxxx> wrote in message
> news:1120116572.795940.240510@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > Hi everybody,
> > I want to know, if it's possible to compile a library of tcl scripts
> > and to load into the interpreter later ?
>
> I believe that is how modern versions of (>= 8.0) Tcl work.
> Search for Tcl bytecode compilation, in particular,
> http://aspn.activestate.com/ASPN/Tcl/TclConferencePapers2002/Tcl2002papers/kenny-bytecode/paperKBK.html
>
> > Also I want to know, (if this is possible) if TCL interpreter runs this
> > scripts faster as it does for text scripts ?
>
> Reputable sources say this is in fact slower.
> From http://wiki.tcl.tk/820:
>
> Believe it or not, Tcl's regular nature means that saving
> byte codes isn't actually a win; reading byte codes using
> the loader is actually slower than generating them afresh
> from Tcl code.
>
> -usman

Well, the statement says that there is no particular advantage
in saving and loading the byte-compiled scripts - as far as
speed is concerned.

It does not mean that using byte-compilation makes the scripts
execute slower. Quite the contrary!

Regards,

Arjen
.



Relevant Pages

  • Re: problems with apps communicating with each other (was Re: Whats TCL related to?)
    ... > Svenn Are Bjerkem wrote: ... this is not a tcl problem is it? ... Synopsys where Tcl/Tk is used as the command language. ... I use code-browser on windows to do tcl scripts. ...
    (comp.lang.tcl)
  • Re: executing a configure script from a tcl scrip
    ... I am having problem to launch the configure script from tcl. ... When working on windows I get the "can't find ... I never compiled Tcl on windows but I do know that configure scripts ... what program you run a Command Window will popup. ...
    (comp.lang.tcl)
  • Re: ANNOUNCE: Tcl/Tk 8.5.0 RELEASED
    ... The Tcl Core Team is pleased to announce the 8.5.0 releases of the Tcl ... Tcl/Tk 8.5.0 sources are freely available as open source from the Tcl ... A summary of the new features visible to Tcl scripts in the Tcl/Tk 8.5 ... Add a Command ...
    (comp.lang.tcl)
  • ANNOUNCE: Tcl/Tk 8.5.0 RELEASED
    ... Tcl/Tk 8.5.0 Release Announcement ... The Tcl Core Team is pleased to announce the 8.5.0 releases of the Tcl ... A summary of the new features visible to Tcl scripts in the Tcl/Tk 8.5 ... Add a Command ...
    (comp.lang.tcl)
  • Speeding up recursive directory traversal
    ... I wrote test scripts and here are ... PHP SUMMARY ... Tcl SUMMARY ... set tail ...
    (comp.lang.tcl)