Check out the new USENIX Web site.

A Tcl to C Compiler

Forest R. Rouse
ICEM CFD Engineering and the
University of California at Davis

Wayne Christopher
ICEM CFD Engineering


A Tcl compiler is described, which accepts Tcl code and generates C code as ouput. Each Tcl proc is converted into a C function that can be called as a Tcl command. This code is then compiled and linked with a special libtcl.a to create an executable. This compiler has passed all the Tcl tests, and has provided a speedup for realistic computationally-intensive applications between a factor of 5 and 10, and for simpler benchmarks up to a factor of 20. In this paper, we will discuss the compiler and the issues involved with compiling Tcl code, includ- ing suggestions for future changes to the language.

Download the full text of this paper in ASCII (30,593 bytes) and POSTSCRIPT (116,312 bytes) form.

To Become a USENIX Member, please see our Membership Information.