antonha commented on PR #13149: URL: https://github.com/apache/lucene/pull/13149#issuecomment-1999485235
I've changed the readInts16/34 methods to now use the `IntsRef` instead - I kind of like how it turned out, but the downside is that we will have to add many implementations to see the benefits. I've added the 2 in the `PointRangeQuery` - if we want to continue down this path, I can add more. One thing that I would love input on is whether or not to manually inline the `visit(docid)` version or not. E.g. I now do: ```java for (int i = ref.offset; i < ref.offset + ref.length; i++) { result.clear(ref.ints[i]); cost[0]--; } ``` While we could do ```java for (int i = ref.offset; i < ref.offset + ref.length; i++) { visit(ref.ints[i]); } ``` The latter would, most likely, be inlined by the JVM. The first is manually inlined, so we don't need to trust the JVM on it. Thoughts? It is important to note that just having the default method in `IntersectVisitor` would not be good, since that would do virtual calls to `visit(int)`. Copy-pasting that method body into each implementation would however, most likely, inline better. -- 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