gortiz commented on PR #12242:
URL: https://github.com/apache/pinot/pull/12242#issuecomment-1933835538

   > is set to null in the close() function
   
   Oh... try to do not do that. It is usually worthless. If the context is 
closed it should be no references to it, so it should be collected. Therefore 
it is is not useful to set the array to null. Contrary, by doing that the close 
code is complicated which can end up producing worse code after JIT.
   
   I'm not saying that is the reason why option 2 is worse than option 1. 
Probably if you do not set the array to null in the close function the 
performance is going to be similar. I'm just adding this context as a tip for 
future implementations where it can matter.
   
   Focusing on this specific case, I think it is expected that option 2 will be 
heavier than 1 given that option 2 has to allocate on each query. My vote was 
for option 2 because it is simpler, cheap enough right now and may probably be 
cheaper than option 1 if in the future we start using virtual threads. But I'm 
ok following option 1.


-- 
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: commits-unsubscr...@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to