Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2007-11-12
09:09 • Closed ticket [1830166fff]: improve regexp performance plus 7 other change... artifact: fda833e551 user: hobbs
09:01 • Add attachment retoglob.diff to ticket [1830166fff] artifact: 116193990c user: hobbs
09:01 • Ticket [1830166fff] improve regexp performance status still Open with 4 ot... artifact: 82df154ace user: hobbs
02:01 • New ticket [1830166fff]. artifact: 07dfaa263d user: hobbs

improve [regexp] performance

Closed / Fixed1830166fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 19 years ago
Descriptionplain2007-11-12 02:01:54
The attached patch extends the basic conversion of static RE to simple glob in several ways ...

* TclReToGlob function created that does some more extensive conversions, but still conservative to what is possible
* Add INST_REGEXP that does simple [regexp ?-nocase? ?--? $exp $str] fully compiled
* Use TclReToGlob in the compilation of regular expressions and cache the result
* Use cached glob whenever a RE evaluation is requested that matches the profile (has glob equiv, doesn't request match info, no offset, etc)
hobbsplain2007-11-12 09:01:54
File Added - 253873: retoglob.diff
hobbsplain2007-11-12 09:09:18
Logged In: YES 
user_id=72656
Originator: YES

Applied for 8.5b3.

Note that this also takes effect in some -regexp option usage by commands (wherever Tcl_RegExpExecObj is called with 0 offset, 0 matches and 0 flags with an RE that has a glob equiv).
Log in (anonymous is fine) to add a comment.

Attachments: