Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 384acb822340f4381c2e95dbccb647efc2c2e937
Ticket: 924097ffffffffffffffffffffffffffffffffff
optimise {}-appends
User & Date: msofer on 2004-03-26 18:35:27
Changes

  1. assignee changed to: "msofer"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    When appending to a Tcl_Obj, check first if the obj to
    be appended is {}. In that case, return the untouched
    original obj - avoid computing it's stringRep or
    invalidating it's internalRep.
    With this in place, the inline version of 
       K $x [set x {}]
    can be written 
       $x[set x {}]
    for greater performance.
    Remark that this optimisation can be done at run time,
    and also at compile time if the obj to be appended is
    known to be {}. The compile time opt is however rather
    involved - in the example above it would be possible in
    principle (as 'set' is compiled, a redefinition will
    trigger a recompilation of the whole script), but not in
       $x[unset x]
    
       
    
  4. foundin changed to: "None"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "msofer"
  9. subsystem changed to: "47. Bytecode Compiler"
  10. title changed to: "optimise {}-appends"
  11. type changed to: "RFE"