Skip to content

[C++][Parquet] Optimize GreaterThanDynamicFunction for Neon #55313

Open

Description

@mapleFU

Describe the enhancement requested

GreaterThanBitmapImpl runs slow for neon, since below might not optimized in ARM:

template <typename Predicate>
inline uint64_t LevelsToBitmap(const int16_t* levels, int64_t num_levels,
                               Predicate predicate) {
  // Both clang and GCC can vectorize this automatically with SSE4/AVX2.
  uint64_t mask = 0;
  for (int x = 0; x < num_levels; x++) {
    mask |= static_cast<uint64_t>(predicate(levels[x]) ? 1 : 0) << x;
  }
  return ::arrow::bit_util::ToLittleEndian(mask);
}

Component(s)

C++, Parquet

Activity

  1. JonSnow1807 commented on Oct 30, 2026

    @JonSnow1807

    I have a NEON version of GreaterThanBitmap along the lines of the FindMinMax kernels from #51478 (NEON-only, x86 untouched), with a randomized test against the scalar loop and a benchmark. On an M2 Pro the 64-length case drops from 15.6 ns to 4.9 ns and the DefinitionLevelsToBitmap benchmarks improve 1.8x to 3.0x. I am at the open-PR limit for new contributors right now and will open it once one of my other PRs merges or closes, unless you would rather take it yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions