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

History Of Ticket 903765ffffffffff

Artifacts Associated With Ticket 903765ffffffffff

  1. Ticket change [d4436c8a92] (rid 123415) by dgp on 2004-02-24 22:07:40:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      It's been noted on the Wiki...
      
          http://wiki.tcl.tk/9585
      
      that the runtime of
      
          expr 1[string repeat +1 $N]
      
      is quadratic in $N.
      
      This is due to Tcl_ParseExpr().
      After each + is parsed in 
      ParseAddExpr(), a call is made
      to PrependSubExprTokens to
      shift the already parsed operands
      down the token array to make room
      for the operand token at the beginning.
      
      This means that $N times, $n tokens
      are copied (as $n grows from 1 to $N)
      just to get the parsing done -- quadratic
      complexity.
      
      Similar issues arise with other expressions
      that call PrependSubExprTokens.
      
      For most short expressions, this penalty
      hardly matters, but a more scalable parser
      would be nice.
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "45. Parsing and Eval"
    10. title initialized to: "avoid quadratic parsing time"
    11. type initialized to: "RFE"
  2. Ticket change [7204a2885c] (rid 100789) by dgp on 2004-03-09 00:46:25:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      The conceptually obvious fix would
      be for the expr parser to stop trying to
      fill a linear Tcl_Token array on the
      fly, and instead have the parser build
      an actual parse tree.  Then when the
      parse tree is complete, a simple
      traversal can create the Tcl_Token
      array in linear time.
      
      It's a simple transformation in concept,
      but a fairly substantial rewrite of
      generic/tclParseExpr.c.  A nice limited
      project for someone who wants to
      get started hacking the core.  Who
      needs a project?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  3. Ticket change [a08b8b9b86] (rid 96831) by dgp on 2004-03-10 06:00:07:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Anyone tackling such a rewrite
      should look into solving
      Tcl Bug 906201 at the same time.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [261500f30e] (rid 88277) by dgp on 2006-07-05 12:34:42:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2006-07-05T05:34:42"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Implemented for 8.5a5
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Accepted"
    8. status changed to: "Closed"
    9. username: "dgp"