You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "iverase (via GitHub)" <gi...@apache.org> on 2025/01/14 19:13:01 UTC
[PR] Implement IntersectVisitor#visit(IntsRef) whenever it makes sense [lucene]
iverase opened a new pull request, #14138:
URL: https://github.com/apache/lucene/pull/14138
In https://github.com/apache/lucene/pull/13149, the method Implement IntersectVisitor#visit(IntsRef) was introduced which is a nice. trick to avoid multiple virtual calls to IntersectVisitor#visit(int).
This was only implemented for PointRangeQuery but it is useful for all implementation that expects hitting that code path. Thrrefore in this PR we proposed to implement this method whenver it make sense.
--
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Implement IntersectVisitor#visit(IntsRef) whenever it makes sense [lucene]
Posted by "iverase (via GitHub)" <gi...@apache.org>.
iverase commented on PR #14138:
URL: https://github.com/apache/lucene/pull/14138#issuecomment-2593332818
Thanks @jpountz. I added the method to the BulkAdder. The good thing is that for the buffer case we can use `System.arraycopy` which is even 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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Implement IntersectVisitor#visit(IntsRef) whenever it makes sense [lucene]
Posted by "iverase (via GitHub)" <gi...@apache.org>.
iverase commented on PR #14138:
URL: https://github.com/apache/lucene/pull/14138#issuecomment-2593604117
I made BulkAdder sealed so we are sure they will always just two implementations.
--
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Implement IntersectVisitor#visit(IntsRef) whenever it makes sense [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #14138:
URL: https://github.com/apache/lucene/pull/14138#issuecomment-2592898984
This makes sense to me, if the `visit()` call is inlined, then feeding the IntsRef into either an int[] (`BufferAdder`) or a `FixedBitSet` (`BitSetAdder`) can be auto-vectorized. Otherwise it can't.
This makes me wonder if we should instead introduce `BulkAdder#add(IntsRef)` and implement these `visit(IntsRef)` methods by calling `adder.add(intsRef)` directly, this would make auto-vectorizing less likely to get disabled by an apparently innocent change.
--
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Implement IntersectVisitor#visit(IntsRef) whenever it makes sense [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #14138:
URL: https://github.com/apache/lucene/pull/14138#issuecomment-2596002171
I opened a PR for the test failure: https://github.com/apache/lucene/pull/14146
--
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Implement IntersectVisitor#visit(IntsRef) whenever it makes sense [lucene]
Posted by "iverase (via GitHub)" <gi...@apache.org>.
iverase commented on PR #14138:
URL: https://github.com/apache/lucene/pull/14138#issuecomment-2593620913
Actually we can make BulkAdder a sealed interface and the implementations are Java records.
--
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Implement IntersectVisitor#visit(IntsRef) whenever it makes sense [lucene]
Posted by "iverase (via GitHub)" <gi...@apache.org>.
iverase merged PR #14138:
URL: https://github.com/apache/lucene/pull/14138
--
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Implement IntersectVisitor#visit(IntsRef) whenever it makes sense [lucene]
Posted by "iverase (via GitHub)" <gi...@apache.org>.
iverase commented on PR #14138:
URL: https://github.com/apache/lucene/pull/14138#issuecomment-2593403998
Unrelated test error: ```
--
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Implement IntersectVisitor#visit(IntsRef) whenever it makes sense [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #14138:
URL: https://github.com/apache/lucene/pull/14138#issuecomment-2594042515
> Unrelated test error
@jimczi This test is failing because we go through a slightly different code path on the first doc of a segment, which generates a slightly different exception message it seems.
--
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-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org