mightsleep commented on PR #11467:
URL: https://github.com/apache/arrow-rs/pull/11467#issuecomment-6424951350

   Yeah, "inc" as in incoming, sorry hehe. u32 split is here: 
https://gist.github.com/mightsleep/be4cb9ad20d4721ab66727fb08e2399f
   
   On the API I'd scratch my suggestion after playing with it. map was a bit 
dumb, try_binary already doesn't fit it. Then I tried keeping the enum private 
and calling it per value, which is basically your first version, and since 
#11525 it's the same as matching outside through `unary`, default and thin LTO. 
But at opt-level=2 the branch stays in the loop, and on real callers it wasn't 
free either: in Comet's bloom filter probe the unswitched loop got too big to 
inline and per value was 7-20% behind matching outside on Zen 3, Zen 5, N2 and 
M1. So your enum makes sense to me.
   
   The other big brain finding of the day: performance depends on the code and 
on the CPU (crazy!). DataFusion's date_bin, which divides behind a function 
pointer, was slower with the divisor than with `/` everywhere, and arrow's 
scalar `/` through try_unary was 5.8x faster on N2 but lost to `/` on M1 with 
nulls.


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