uschindler commented on PR #12841: URL: https://github.com/apache/lucene/pull/12841#issuecomment-1846710600
> Thank you for quick impl Adrien, for reference, i tried this approach [code link](https://github.com/easyice/lucene/commit/13851013e98ff8e27f05fa6dc4bc2e450ea6c03d#diff-c81a04bd13d225f3a2dc2c47bde9590686fe5bb0a197c99eeec1a35bf2cc04cc) ,it's no performance regression on NIOFSDirectory and ByteBuffersDataInput, but terrible performance on MemorySegment: This looks fine from the implementation, looks cool. The performance on mmap is bad, there must be some problem with the slice/asBuffer code. I know that this made problems in the past (till Java 17 incubating APIs it was *not possible* to copy slices of data from a MemorySegment to a heap array, so readBytes/readLongs/readFloats needed to be implemented to use a slice and then copy the whole slice to the heap array). See a early draft #177. The JDK people fixed it, so we can use the copy methods in MemorySegment now: https://bugs.openjdk.org/browse/JDK-8268743 It looks like we were hit by the same problem. The reason was that escape analysis did not work correctly, so the slice was allocated on every call. This should no longer be a problem, so maybe investigate what the problem is. Do you see GC activity during benchmark? Anyways, thanks for trying. I like the new code much better, but it does not help for MemorSegment. :-( -- 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