Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-10-23
15:45 • Ticket [562297ffff] Optimizing if {[string compare} ...] status still Open... artifact: 19130412c9 user: dkf
2006-10-14
23:08 • Open ticket [562297ffff]. artifact: 075b2be3a1 user: dkf
09:20 • Closed ticket [562297ffff]. artifact: 2336b6322e user: sf-robot
2006-09-30
08:02 • Pending ticket [562297ffff]. artifact: fb678574c3 user: msofer
2002-08-08
14:45 • Ticket [562297ffff]: 4 changes artifact: 0d8f1ec03c user: hobbs
2002-05-30
22:48 • Add attachment str_optimize.patch2 to ticket [562297ffffffffff|562297ff... artifact: 4fb6e93854 user: msofer
22:48 • Ticket [562297ffff] Optimizing if {[string compare} ...] status still Open... artifact: b9217821e7 user: msofer
18:11 • Add attachment str_optimize.patch to ticket [562297ffffffffff|562297fff... artifact: 1f486753dc user: dkf
18:11 • Ticket [562297ffff] Optimizing if {[string compare} ...] status still Open... artifact: 815a0b575f user: dkf
11:11 • New ticket [562297ffff]. artifact: 73a72bf198 user: dkf

Optimizing [if {[string compare]} ...]

Open562297ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 17 years ago
Descriptionplain2002-05-30 11:11:31
This patch converts [string compare] so that it
generates INST_STR_EQ;INST_LNOT instead of INST_STR_CMP
when the comparison is going to be used as a boolean
test in the [if], [for] and [while] commands.  This
should be faster, particularly on longer strings,
because we don't need to know how the strings differ. 
Part of the patch could be construed to form the basis
for a more general optimization framework, but that
probably needs more work to realize...
dkfplain2002-05-30 18:11:31
File Added - 24029: str_optimize.patch
msoferplain2002-05-30 22:48:12
File Added - 24060: str_optimize.patch2

Logged In: YES 
user_id=148712

Updated patch (after HEAD modifs due to [Bug 562383].
hobbsplain2002-08-08 14:45:21
Logged In: YES 
user_id=72656

While this looks good in general, I'd prefer focusing on a post-
pass optimizer that can look at the whole tree and streamline 
such cases globally.  Thus we could also get rid of the 
INST_TRY_CVT_NUMERIC in many cases, along with finding 
INST_STR_CMP == 0 static, which is INST_STR_EQ, etc.
msoferplain2006-09-30 08:02:47
Logged In: YES 
user_id=148712

After so many years ... we'll eventually have the
post-optimiser.
sf-robotplain2006-10-14 09:20:08
Logged In: YES 
user_id=1312539

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
dkfplain2006-10-14 23:08:12
Logged In: YES 
user_id=79902

Assigned to me so I remember to revisit this once we've
solved the general optimization stuff.
dkf Ticket [562297ffff]: 1 change [History diff]2009-10-23 15:45:30
Log in (anonymous is fine) to add a comment.

Attachments: