Version 5 of Script Compilation

Updated 2013-09-02 16:48:53 by pooryorick

Summary

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
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
tcl2c
Lightning
GNU lightning is a library that generates assembly language code at run-time

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.