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: Usman Muzaffar <usman@mailinator.com>
Date: Thu Jun 30 2005 - 09:53:01 CEST

"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
Received on Thu Sep 29 14:23:58 2005