liyafan82 commented on pull request #8214:
URL: https://github.com/apache/arrow/pull/8214#issuecomment-694850013


   > +1, integration test failure is unrelated.
   > 
   > @liyafan82 since you're also working in this space, what do you think of 
the optimization here? I think it's an easy win and will help the non-nullable 
vector case too.
   
   @josiahyan Thanks for providing the patch. This is a problem that needs to 
be addressed. 
   
   I am a little surprised that JIT failed to transform the integer divistion 
to a right shift, as it can be easily deduced that the type width for an 
IntVector is always 4. 
   
   This change improves the peformance by saving the number of bits to shift 
and use a if branch to check if shift operations applies.
   
   I am thinking about another way: can we simply save the value/validity 
buffer capacities? so we can further improve the performance by avoiding the if 
branch in `getValueBufferValueCapacity` and the if branch in  `capAtMaxInt`


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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to