uschindler commented on PR #12311:
URL: https://github.com/apache/lucene/pull/12311#issuecomment-1559566170

   > Agreed. I don't think we care enough to try this - what's the point. 
Pushed 
[74a9782](https://github.com/apache/lucene/pull/12311/commits/74a9782240dc3b0eb99f19c324be304117371e46)
   
   Cool thanks. I was about to do the same, my idea was a bit different: Add a 
normal virtual method "isSupported()" to the interface and implement it 
returning true for default provider but returning something depending on vector 
size for panama provider. This would spare two times doing the additional 
reflection using the lookup. The lookup function would only return the panama 
provider if it returns true.
   
   Another approach is to use Lookup#findStaticVarHandle() on 
`INT_SPECIES_PREF_BIT_SIZE` and read it. This spares catching `Throwable`, 
which is one of the things I hate about method handles.


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