Uploaded image for project: 'Lucy'
  1. Lucy
  2. LUCY-5 Boilerplater compiler
  3. LUCY-29

Speed up Boilerplater::Parser and improve test coverage.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Clownfish
    • None

    Description

      The production for composite types in Boilerplater::Parser is inefficient,
      because it builds a simple Type object before failing to match, and this Type
      object is subsequently discarded when the parser backtracks. The simple Type
      – which matched, on the way to failing to create a complete composite type –
      now must be built up again.

      By using the simple Type object rather than discarding it when the composite
      type fails to match, we can speed up the parser by around 30%.

      This patch also expands the test coverage for the parser, adding tests for
      many lower level productions.

      Attachments

        1. parser_speed_and_coverage.diff
          9 kB
          Marvin Humphrey

        Activity

          People

            marvin Marvin Humphrey
            marvin Marvin Humphrey
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: