uschindler commented on code in PR #15866:
URL: https://github.com/apache/lucene/pull/15866#discussion_r2984116055
##########
lucene/core/src/java25/org/apache/lucene/internal/vectorization/NativeVectorUtilSupport.java:
##########
@@ -259,7 +259,9 @@ private static float invokeFloatMethodHandle(MethodHandle
mh, MemorySegment a, M
private static <T> T invokeOrDelegate(MethodHandle mh, Supplier<T> delegate,
Object... args) {
if (mh != null) {
try {
- return (T) mh.invokeExact(args);
+ // TODO: This is slow and we should avoid dynamic invocations and
improve the test coverage
+ // (https://github.com/apache/lucene/issues/15840)
+ return (T) mh.invokeWithArguments(args);
Review Comment:
This may not work so easy, so let's do that later. We need tests. But in the
ideal case we should call all methods statically. Its more try-catch logic but
it is needed for performance.
--
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]