-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[C++] Avoid repeated ArrayData::offset lookups in concrete Array classes #44194
Copy link
Copy link
Closed
Description
Describe the enhancement requested
Lookup functionality in concrete array classes can be invoked repeatedly in some operations, e.g. the sort kernels which access multiple array chunks in random order:
arrow/cpp/src/arrow/array/array_primitive.h
Lines 105 to 109 in 0f7b5e5
| const value_type* raw_values() const { | |
| return reinterpret_cast<const value_type*>(raw_values_) + data_->offset; | |
| } | |
| value_type Value(int64_t i) const { return raw_values()[i]; } |
The compiler might always not be able to hoist the data_->offset lookup out of loops, therefore it would be useful to avoid it altogether.
Component(s)
C++
Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Fields
Give feedbackNo fields configured for issues without a type.