Skip to content
Tcl Source Code History Of Ticket 218246ffffffffff
Login

History Of Ticket 218246ffffffffff

Artifacts Associated With Ticket 218246ffffffffff

  1. Ticket change [3a41e88bc9] (rid 112535) by nobody on 2000-10-26 00:55:01:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 2820 RFE
      Version: 8.2
      SubmitDate: '1999-09-17'
      LastModified: '1999-12-09'
      Severity: LOW
      Status: Closed
      Submitter: techsupp
      ChangedBy: hobbs
      RelatedBugIDs: 2257
      OS: Solaris
      OSVersion: 2.7
      Machine: Other
      FixedDate: '2000-10-25'
      ClosedDate: '1999-12-09'
      
      
      Name:
      
      Donal Fellows
      
      
      
      Comments:
      
      The patch I supply fixes this in a way that makes an improvement where
      
          it is safe to do so, and otherwise preserves existing behaviour.  It
      
          breaks no existing script (assuming the correct implementation of
      
          Tcl_EvalObjv() that is) and has almost no effect on performance outside
      
          its specific domain of applicability (it detects pure lists - those
      
          without a potentially dangerous string version - and uses Tcl_EvalObjv
      
          to execute them instead of the main part of Tcl_EvalObj.)
      
      
      
      DesiredBehavior:
      
      The standard version of Tcl_EvalObj does not treat a pure list
      
          specially, despite the fact that you can make the guarantee that the
      
          effect of:
      
                eval [list $var1 $var2 ... $varN]
      
          is precisely the same as:
      
                $var1 $var2 ... $varN
      
          whatever the contents of the variables $var1, $var2, ... $varN
      
          
      
          I want this inefficiency removed/reduced.  It makes a particularly big
      
          difference when you start to throw around lists with 10k elements in
      
          recursive calls through OO code...
      
      
      
      Patch:
      
      *** /home-local/rainbow/tcl8.2.0/generic/tclBasic.cSat May 15 00:16:54 1999
      
      --- tclBasic.cFri Sep 17 10:18:41 1999
      
      ***************
      
      *** 2561,2566 ****
      
      --- 2561,2583 ----
      
        return result;
      
            }
      
        
      
      +     /*
      
      +      * Check to see if we have a pure list (no string version.)  If so,
      
      +      * we can safely use Tcl_EvalObjv instead and get an appreciable
      
      +      * improvement in execution speed.  This is because it allows us to
      
      +      * avoid a setFromAny step that would just pack everything into a
      
      +      * string and back out again.
      
      +      */
      
      +     if (codePtr->typePtr == &tclListType && /* is a list... */
      
      + codePtr->bytes == NULL /* ...without a string version */) {
      
      +         register List *listRepPtr =
      
      +     (List *)codePtr->internalRep.otherValuePtr;
      
      +         result = Tcl_EvalObjv(interp, listRepPtr->elemCount,
      
      +       listRepPtr->elements, flags);
      
      + Tcl_DecrRefCount(codePtr);
      
      + return result;
      
      +     }
      
      + 
      
            savedVarFramePtr = iPtr->varFramePtr;
      
            if (flags & TCL_EVAL_GLOBAL) {
      
        iPtr->varFramePtr = NULL;
      
      
      
      PatchFiles:
      
      tclBasic.c
      
      
      
      
      
      This code is an incorrect patch (can't compile when patched in,
      and when fixed, the tests start breaking).  This is possibly an
      interesting optimization, but a patch has to pass the test suite. 
      -- 12/09/1999 hobbs
      
    4. foundin initialized to: "obsolete: 8.2"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "10. Objects"
    10. title initialized to: "Enhancement for [eval] execution speed"
    11. type initialized to: "Bug"
  2. Ticket change [40281a18f0] (rid 121587) by welch on 2000-10-26 08:17:55:

    1. closedate changed to: "2000-10-26T01:17:55"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"