Artifacts Associated With Ticket 625441ffffffffff
Ticket change [e1b6e8bc60] (rid 87502) by schmitzu on 2002-10-18 22:41:45:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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?! - foundin initialized to: "obsolete: 8.4.0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "schmitzu"
- subsystem initialized to: "43. Regexp"
- title initialized to: "Error in compiling regexp"
- type initialized to: "Bug"
Ticket change [8c66492a56] (rid 127734) by hobbs on 2002-10-19 06:10:27:
- closedate changed to: "2002-10-18T23:10:27"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 This is already corrected in the head for 8.4.1.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "hobbs"