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...
Optimizer Patch (UniDiff)
Logged In: YES
user_id=148712
Updated patch (after HEAD modifs due to [Bug 562383].
updated patch
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.
Logged In: YES
user_id=148712
After so many years ... we'll eventually have the
post-optimiser.
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).
Logged In: YES
user_id=79902
Assigned to me so I remember to revisit this once we've
solved the general optimization stuff.