Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-17140

Optimize TRIM() in comparison

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Accepted
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Code Generator
    • Labels:
      None
    • Compatibility:
      Minor

      Description

      Trailing spaces are not significant when strings are compared.

      Therefore a test of the form TRIM = y can be simplified to x = y.

      In many cases it will be more efficient - especially if the condition is false - and it will also generate better code.

      (Only exception is DATA which is not implicitly trimmed on comparison.)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ghalliday Gavin Halliday
                Reporter:
                ghalliday Gavin Halliday
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: