Skip to content

Pre-reserve rowlen in UnfilteringBuffer #661

@197g

Description

@197g

I wonder if (maybe even as a separate PR, or at least a separate commit) it would help to change how UnfilteringBuffer is initialized. In particular, I wonder if things would be simplified if UnfilteringBuffer would always have room for 2 mutable rows (2 times rowlen bytes). IMHO this may be beneficial in the following ways:

  • This way prev_row always exists (initially filled with zeros) and we don’t need to worry about special-casing unfiltering of the first row.
  • This way there is no need for shifting/shuffling things around in fn unfilter_ahead_row / fn unfilter_curr_row_in_scratch_buffer, because the "scratch buffer" is always / already present at the beginning of the buffer.

WDYT?

Originally posted by @anforowicz in #640 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions