tustvold commented on code in PR #2360:
URL: https://github.com/apache/arrow-rs/pull/2360#discussion_r940118590


##########
arrow/src/array/array_decimal.rs:
##########
@@ -336,6 +336,31 @@ impl BasicDecimalArray<Decimal128, Decimal128Array> for 
Decimal128Array {
         }
         Ok(())
     }
+
+    fn validate_decimal_with_bytes(&self, precision: usize) -> Result<()> {

Review Comment:
   > yes, i think the overhead is from the xxDecimal::new() and convert to i128.
   
   LLVM should be smart enough to elide this, it likely isn't because there are 
bound checks on the byte array length (which are completely unnecessary) and it 
isn't smart enough to elide these, which prevents eliding the rest.
   
   It should definitely be possible to make these methods perform the same, it 
just might require a bit of hand-holding to help LLVM. This would then benefit 
all call-sites that use the iterator



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