Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-648

Performance: Can eliminate many AlignmentFill parsers with simple optimization


    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Blocking Blocking
    • 2.0.0
    • s13
    • Middle "End"
    • None

      AlignmentFill regions are placed in front of any item which has alignment > 1 bit, and this includes in front of anything with implicit alignment (unless the implicit alignment is 1 bit).

      However, with some static analysis, one can determine that the item (sequence or element) already is aligned by necessity. I.e., the previous thing has left it on the right alignment boundary.

      For example, if several adjacent elements are text in the same encoding, then we don't need alignmentFill regions before each one. There are many more cases that are also relatively easy to determine.

      An attribute (i.e., LV) on each alignable thing (element, sequence, choice) should indicates what its statically-known alignment is. This is the basis for the optimization. Then the alignmentFill primitive can just optimize itself out (via guard) when the statically known alignment is sufficient.

              slawrence Steve Lawrence
              mbeckerle.dfdl Mike Beckerle
              0 Vote for this issue
              3 Start watching this issue