Overview
| Artifact ID: | b2b0f64ebb8c80c6ef5eeb5463839a664e1b015b |
|---|---|
| Ticket: | 1119369fffffffffffffffffffffffffffffffff
segfault in Tcl_EvalObjv (from Tcl_EvalObjEx call) |
| User & Date: | msofer on 2005-02-11 23:40:43 |
Changes
- icomment:
Logged In: YES user_id=148712 This is the "pure list optimisation": if a script is a "pure list" (list internal rep and no string rep => guaranteed to parse to the same list rep), by executing it directly you avoid: 1. building a string rep of the script 2. parsing the script into a sequence of commands (there's only one!) 3. parsing each command into words (we had them already); note that each word would then be a fresh Tcl_Obj - ie, no internal rep. The pure list opt avoids these steps, and can also profit from reusing cached internal reps. % proc foo x {set x} % set scr [list foo 1]; time {eval $scr} 100000 9 microseconds per iteration % string length $scr; time {eval $scr} 100000 17 microseconds per iteration - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"