tustvold commented on code in PR #6893:
URL: https://github.com/apache/arrow-rs/pull/6893#discussion_r1890021873
##########
arrow-buffer/src/buffer/offset.rs:
##########
@@ -162,6 +163,44 @@ impl<O: ArrowNativeType> OffsetBuffer<O> {
}
}
+impl<O: ArrowNativeType + Integer + Copy> OffsetBuffer<O> {
Review Comment:
I would recommend a focus on getting something correct and working before
trying to optimise it, and then when trying to optimise use empirical
benchmarks.
FWIW I suspect this code will optimise very poorly as a result of the
dynamic dispatch.
TLDR I would recommend using from_lengths (or OffsetBufferBuilder) unless
you can empirically show an alternative approach is sufficiently faster to
warrant the additional complexity.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]