scovich commented on PR #9689:
URL: https://github.com/apache/arrow-rs/pull/9689#issuecomment-4304892843

   I don't know why the CI shows a regression your laptop doesn't, but it's 
likely some microarchitectural difference (or even architectural, if e.g. x86 
vs. arm). Something related to branch prediction hardware, perhaps? (cloud 
providers had to disable a bunch of hardware optimizations a few years ago, due 
to some nasty side channel attacks)
   
   Meanwhile, looking at the code, my best guess is that the compiler may not 
honor the `#[inline]` hint on `cast_single_decimal_to_integer_result`. That 
would be a double ouch -- not only the usual overheads that inlining tries to 
avoid, but also a newly introduced branch on the `negative` flag that is a 
constant at call site but becomes an actual branch inside the non-inline 
function. Try making that arg a const generic, like 
`cast_single_decimal_to_integer_opt`, and/or upgrade the hint to 
`#[inline(always)]`?


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