Re: binary tcl scripts? is it possible? is it faster ?
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

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

From: Arjen Markus <arjen.markus@wldelft.nl>
Date: Thu Jun 30 2005 - 12:20:34 CEST

Usman Muzaffar wrote:
>
> "Walid" <walid.benyoussef@gmail.com> wrote in message
> news:1120116572.795940.240510@g44g2000cwa.googlegroups.com...
> > 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
Received on Thu Sep 29 14:24:00 2005