| Ticket UUID: | 562297 | ||
| Title: | Optimizing [if {[string compare]} ...] | ||
| Type: | Patch | Created on: | 2002-05-30 11:11:31 |
| Submitter: | dkf | Assigned to: | dkf |
| Subsystem: | 45. Parsing and Eval | Severity: | |
| Priority: | 2 | Last modified: | 2009-10-23 15:45:30 |
| Status: | Open | Closed by: | sf-robot |
| Resolution: | Later | Closed on: | 2006-10-14 02:20:08 |
| Version: | None | ||
| Description: | ||||
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... | ||||
| User Comments: | ||||
dkf added on 2002-05-30 18:11:31:
File Added - 24029: str_optimize.patch msofer added on 2002-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]. hobbs added on 2002-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. msofer added on 2006-09-30 08:02:47:
Logged In: YES user_id=148712 After so many years ... we'll eventually have the post-optimiser. sf-robot added on 2006-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). dkf added on 2006-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. | ||||
Attachments:
- str_optimize.patch2 [download] added by msofer on 2002-05-30 22:48:12. [details]
- str_optimize.patch [download] added by dkf on 2002-05-30 18:11:31. [details]
