apache / apache/arrow

[C++] Improve kernel performance on small batches

Open
#26,049 7 comments 0 reactions 0 assignees View on GitHub
Component: C++ Type: task
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

It seems that invoking some kernels on smallish batches has quite an overhead:
```Java

ArrayArrayKernel/32768/100 2860 ns 2859 ns 245195 bytes_per_second=10.6727G/s items_per_second=2.86494G/s null_percent=1 size=32.768k
ArrayArrayKernel/32768/0 2752 ns 2751 ns 249316 bytes_per_second=11.093G/s items_per_second=2.97775G/s null_percent=0 size=32.768k
ArrayArrayKernel/524288/100 18633 ns 18630 ns 36548 bytes_per_second=26.2097G/s items_per_second=7.03561G/s null_percent=1 size=524.288k
ArrayArrayKernel/524288/0 18260 ns 18257 ns 38245 bytes_per_second=26.7451G/s items_per_second=7.17933G/s null_percent=0 size=524.288k
```

We should investigate and try to lighten the overhead.

**Reporter**: [Antoine Pitrou](https://issues.apache.org/jira/browse/ARROW-10026) / @pitrou
#### Related issues:
- [[C++] Improve array expression and kernel evaluation performance on small inputs](https://github.com/apache/arrow/issues/20277) (relates to)

**Note**: *This issue was originally created as [ARROW-10026](https://issues.apache.org/jira/browse/ARROW-10026). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Research direction

Start by locating the ArrayArrayKernel benchmark represented in the issue and compare the small-batch results with the larger-batch cases. Investigate where kernel invocation overhead is introduced; done means demonstrating lighter overhead on small inputs with updated benchmark results, though the issue gives no target or test file.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.