fansehep commented on code in PR #5101:
URL: https://github.com/apache/arrow-rs/pull/5101#discussion_r1399110901


##########
arrow-json/src/reader/string_array.rs:
##########
@@ -89,6 +97,12 @@ impl<O: OffsetSizeTrait> ArrayDecoder for 
StringArrayDecoder<O> {
                 TapeElement::Number(idx) if coerce_primitive => {
                     builder.append_value(tape.get_string(idx));
                 }
+                TapeElement::I64(n) | TapeElement::I32(n) if coerce_primitive 
=> {

Review Comment:
   > Because the TapeElement would then need to increase in size from the 
current 64-bits to 128-bits (for alignment reasons), tape decoding is 
exceptionally hot and so concerns like this actually matter 😅
   
   I get it. Just for performance. 😺 



##########
arrow-json/src/reader/string_array.rs:
##########
@@ -89,6 +97,12 @@ impl<O: OffsetSizeTrait> ArrayDecoder for 
StringArrayDecoder<O> {
                 TapeElement::Number(idx) if coerce_primitive => {
                     builder.append_value(tape.get_string(idx));
                 }
+                TapeElement::I64(n) | TapeElement::I32(n) if coerce_primitive 
=> {

Review Comment:
   > Because the TapeElement would then need to increase in size from the 
current 64-bits to 128-bits (for alignment reasons), tape decoding is 
exceptionally hot and so concerns like this actually matter 😅
   
   I get it. Just for performance. 😺 



-- 
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]

Reply via email to