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

History Of Ticket 625441ffffffffff

Artifacts Associated With Ticket 625441ffffffffff

  1. Ticket change [e1b6e8bc60] (rid 87502) by schmitzu on 2002-10-18 22:41:45:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      I've detected an error in the compilation of the
      regexp command.
      
      Put the following code into a file called
      tstRegexp.tcl:
      
      <code>
      proc isblank {word} {
         if {[regexp {^[ ]*$} $word]} {
            puts "is blank"
         } else {
            puts "is not blank"
         }
      
      #...some unnecessary lines
         .
         . <Repeat this line 1000 times!>
         .
      #...some unnecessary lines
      
      }
      
      puts [time [list isblank "Hello"]]
      </code>
      
      It's *very* important to repeat the
      comment line!!
      
      On my old 400Mhz AMD with WinME and
      the new ActiveTcl4.0.1 distribution,
      the output of "tclsh84 tstRegexp.tcl" is:
      
      is not blank
      94107834 microseconds per iteration
      
      Over 90 seconds is a very long time,
      for such a simple script!
      
      With the older Tcl8.3.4 the output varies
      between 0 and 60000 microseconds.
      
      I've looked a little bit deeper into
      it, and detected that most of the time is
      wasted in TclCompileRegexpCmd. A little
      bit deeper in the calling tree it does
      many recursive calls to duptraverse.
      The problem seems to be, that the 
      string for the regexp compilation is
      the whole rest of the proc (including
      the many comments). I think there is
      an error in detecting the end of 
      the regexp string?!
      
      
      
    4. foundin initialized to: "obsolete: 8.4.0"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "schmitzu"
    9. subsystem initialized to: "43. Regexp"
    10. title initialized to: "Error in compiling regexp"
    11. type initialized to: "Bug"
  2. Ticket change [8c66492a56] (rid 127734) by hobbs on 2002-10-19 06:10:27:

    1. closedate changed to: "2002-10-18T23:10:27"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      This is already corrected in the head for 8.4.1.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "hobbs"