Skip to content

Reuse existing null masks when superimposing struct nulls onto children - #23484

Draft
vuule wants to merge 2 commits into
rapidsai:mainfrom
vuule:superimpose-nulls-in-place
Draft

Reuse existing null masks when superimposing struct nulls onto children#23484
vuule wants to merge 2 commits into
rapidsai:mainfrom
vuule:superimpose-nulls-in-place

Conversation

@vuule

@vuule vuule commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

The batched superimpose_nulls, reached from the Parquet, ORC and Avro readers via enforce_null_consistency, allocated a new null mask for every column in the struct hierarchy and moved it in, even though every nullable column already owns one of exactly the right size. It now ANDs into the existing masks with inplace_segmented_bitmask_binop, which removes about 192 allocations per read in parquet_read_fixed_width_struct: 3.5-4.2% faster with the pool resource, 4.2-5.6% with async, and 19.5 MiB lower peak memory.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

The batched superimpose_nulls allocated a new null mask for every column in
the struct hierarchy and moved it in, even though every nullable column
already owns one of exactly the right size. AND into the existing masks
instead, allocating only for columns that have no mask yet.
@copy-pr-bot

copy-pr-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the libcudf Affects libcudf (C++/CUDA) code. label Jul 30, 2026
@vuule vuule added Performance Performance related issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Performance Performance related issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant