TC: An Efficient Implementation of the Tcl Language

Adam Sah

EECS Department
University of California, Berkeley
Technical Report No. UCB/CSD-94-812
April 1994

http://www2.eecs.berkeley.edu/Pubs/TechRpts/1994/CSD-94-812.pdf

Tcl is a highly dynamic language that is especially challenging to execute efficiently. In this paper, I discuss many issues involved in implementing Tcl, and describe a design for a faster system that maintains Tcl semantics, including its C callout mechanism. This design focuses on a method for caching the parsed representation for data values, and lazily converting to strings on demand. This allows most computations to be performed using native types (e.g. integers) rather than strings. The current implementation is presented along with results showing a speedup of about 5-10 times over the existing Tcl interpreter.


BibTeX citation:

@techreport{Sah:CSD-94-812,
    Author = {Sah, Adam},
    Title = {TC: An Efficient Implementation of the Tcl Language},
    Institution = {EECS Department, University of California, Berkeley},
    Year = {1994},
    Month = {Apr},
    URL = {http://www2.eecs.berkeley.edu/Pubs/TechRpts/1994/5189.html},
    Number = {UCB/CSD-94-812},
    Abstract = {Tcl is a highly dynamic language that is especially challenging to execute efficiently. In this paper, I discuss many issues involved in implementing Tcl, and describe a design for a faster system that maintains Tcl semantics, including its C callout mechanism. This design focuses on a method for caching the parsed representation for data values, and lazily converting to strings on demand. This allows most computations to be performed using native types (e.g. integers) rather than strings. The current implementation is presented along with results showing a speedup of about 5-10 times over the existing Tcl interpreter.}
}

EndNote citation:

%0 Report
%A Sah, Adam
%T TC: An Efficient Implementation of the Tcl Language
%I EECS Department, University of California, Berkeley
%D 1994
%@ UCB/CSD-94-812
%U http://www2.eecs.berkeley.edu/Pubs/TechRpts/1994/5189.html
%F Sah:CSD-94-812