Skip to content

Clickbench microbenchmark spends significant time in memcmp for not_empty predicate #7766

Closed

Description

@jhorstmann

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

I ran the arrow_reader_clickbench microbenchmark in a profiler and noticed that a significant amount of time is spent in memcmp when evaluating comparisons against an empty string. There is already a fast path in GenericByteViewArray::is_eq for unequal lengths, but when both lengths are zero then a call to memcmp is generated.

Describe the solution you'd like

Add another fast path.

Describe alternatives you've considered

This optimization might be too specific to the clickbench queries. I think it is unlikely to be a measurable slowdown for other queries though.

Additional context

I benchmarked this on an uncompressed version of the clickbench hits_1.parquet, generated using parquet-rewrite with no other arguments. Otherwise the majority of time in this benchmark is spent in snappy decompression.

Activity

  1. added
    enhancement
    on Jun 24, 2025
  2. added a commit that references this issue on Jun 25, 2025
    71ac9bd
  3. added
    arrow
    on Jul 28, 2025
  4. alamb commented on Jul 28, 2025

    @alamb
    Contributor

    label_issue.py automatically added labels {'arrow'} from #7767

  5. added
    performance
    and removed
    enhancement
    on Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arrowperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions