wuwm commented on PR #968:
URL: https://github.com/apache/lucene/pull/968#issuecomment-1163529556

   Thanks @zacharymorn for comments! 
   
   There are some implementation diff inside binary search between two methods 
to handle some edge cases. To make binary search into a single common method, I 
thought of two ways: A) Add a lambda expression as method parameter to pass in 
implementation diff part. B) Add if-else to the combined single method. I felt 
both of them may make readability worse?
   
   Also, I feel, for future changes, since these two methods serve different 
use cases, future optimization may vary as well (Not an expert in this part, 
feel free to correct me). Combing into a common method might make future 
changes complex.


-- 
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: issues-unsubscr...@lucene.apache.org

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


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

Reply via email to