hossman commented on issue #15292:
URL: https://github.com/apache/lucene/issues/15292#issuecomment-3953719323

   > One issue I see with is that, if tomorrow we have more than one "optimized 
version" we wouldn't be able to differentiate between the two.
   
   It really all depends on how you want to define/document the `isOptimized()` 
method -- we could say that multiple "implementations" might be considered 
optimized depending on ... whatever ..., and just leave it at that.
   
   IIUC That's basically what happens today with `PanamaVectorUtilSupport`: you 
could argue that (from a users perspective) that one class really encapsulates 
two different "implementations", depending on the value of 
`HAS_FAST_VECTOR_FMA`.
   
   With the current patch (or with the approach in the linked PR), 
`PanamaVectorUtilSupport.isOptimized()` isn't going to help you distinguish 
those two "implementations" -- from the users' perspective, two different 
"versions" of the code are available, and both are considered "optimized" 
   
   Or...
   
   We could always document `isOptimized()` slightly differently, to say it 
will only ever return `true` if it is the absolutely best possible 
implementation lucene can use -- in which case 
`PanamaVectorUtilSupport.isOptimized()` would be redefined to `return 
HAS_FAST_VECTOR_FMA`
   
   Or you could do a mix of the two by leaving `isOptimized()` alone, but 
adding an `isBestPossible()` method?
   
   it all depends on how deep folks want to go down the rabbit hole.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to