tustvold commented on code in PR #6534:
URL: https://github.com/apache/arrow-rs/pull/6534#discussion_r1794280364
##########
arrow-array/src/builder/generic_bytes_dictionary_builder.rs:
##########
@@ -208,7 +208,21 @@ where
/// value is appended to the values array.
///
/// Returns an error if the new index would overflow the key type.
+ #[inline]
Review Comment:
What is the motivation for this, is there some benchmark you've used? Given
how problematic dictionary codegen already is, because everything is generated
for each key-value combination, I'm rather wary of this
##########
arrow-array/src/builder/generic_bytes_dictionary_builder.rs:
##########
@@ -208,7 +208,21 @@ where
/// value is appended to the values array.
///
/// Returns an error if the new index would overflow the key type.
+ #[inline]
pub fn append(&mut self, value: impl AsRef<T::Native>) ->
Result<K::Native, ArrowError> {
+ self.append_many(value, 1)
Review Comment:
Perhaps we could instead extract the entry logic into a private member
function, I'd be less concerned about potential performance regressions that
way, LLVM does funny things with integer loops
--
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]