sudheerbhat opened a new issue, #1238:
URL: https://github.com/apache/arrow-java/issues/1238

   ### Describe the enhancement requested
   
   This is my first issue report here. Thanks for all the wonderful work.
   
   Usecase: I am planning to replace our parquet-mr based parquet writer with 
arrow-java to arrow-rs via SharedMemory IPC. Each Kubernetes pod writes about 3 
to 4 thousand event per second per pod. The original schema does have some 
heavy nesting (thrift influence) and schema redesign while desirable but is a 
much longer exercise. In the process of proof of concept, was able to get the 
whole flow working but when running some sample shadow flows, saw that all 
dispatch via 
   ```java
   PromotableWriter.setPosition(int index)
   ```
   would result in a itable dispatch. Looking at it, there could be multiple 
implementations of FieldWriter's at callsite and C2 fails to convert it into 
monomorphic or bimorphic calls. Was able to get a synthetic benchmark setup 
inside the performance module and can see the same in JMH runs too.
   
   <img width="1399" height="289" alt="Image" 
src="https://github.com/user-attachments/assets/e6acbb54-ba56-4998-9fa2-3c28de5e1a0f";
 />
   
   We can convert the itable dispatch to a vtable dispatch by the method to be 
dispatched over AbstractFieldWriter. I will do more tests around the same and 
can submit the PR here. Tried searching over the issues and this doesn't seem 
to have been reported so far. Just curious if I am doing something wrong when 
using ListVector's (and hence holding back attaching the PR straight away!).
   
   Just pasting the screen grab of the actual struct writer used in the 
benchmark. The benchmark is produced by claude (as one can make it out looking 
at the comments, but it seemed pretty ok to me).
   
   <img width="758" height="804" alt="Image" 
src="https://github.com/user-attachments/assets/e7c4c172-305e-451b-a8d6-37b186a6aa18";
 />


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