Script Compilation

Various ideas have been proposed and systems introduced in an attempt to improve Tcl perfomance via some kind of script compilation. This pages exists to enumerate and organize those ideas. For information about packaging, obfuscating, and deploying scripts, possibly as stand-alone executables, see deployment

See Also

deployment
Cameron Laird's personal notes on Tcl compilers
bytecode
A Tcl Compiler Idea
GE ICE Tcl compiler
A commercial Tcl compiler available for a number of Unix platforms.
JIT
OttoCompiler
a Tcl compiler that may or may not be what it claims to be
Kt2c
translates Tcl bytecodes into C. * Note on June 08, 2004: TPHNRAF
Radical reform of the execution engine
A discussion and ongoing project to generate native code from Tcl bytecodes.
tcl2c
Lightning
GNU lightning is a library that generates assembly language code at run-time
TJC compiler
A Tcl compiler for the TclJava project.
Tcl Static Prime
An experimental compiler for the Tcl language that produces C or Java code.

Reading

interpretated vs compiled ,comp.lang.tcl ,2003-08-16

Tcl Bytecode

Since version 8.4, Tcl has featured the ability to automatically translate scripts into bytecode where feasible, and, for the most part, script authors don't have to do anything particularly special to take advantage of it. Lambdas and procedures are automatically translated to bytecode, and where feasible, so are arguments to expr-like commands such as if, while, and expr itself.

The Tcl 8.x built in compilation phase into bytecodes does not provide hooks for storing or loading later the bytecodes. There is at least one other standalone compiler which addresses this issue.