Minor optimization in ExpandHalfToFull - #1264
Open
aprokop wants to merge 2 commits into
Open
Conversation
dalg24
previously approved these changes
Jun 11, 2025
dalg24
left a comment
Contributor
There was a problem hiding this comment.
Please share perf test results
aprokop
force-pushed
the
minor_optimization
branch
from
June 12, 2025 21:36
3fc5cdc to
c15dbd2
Compare
dalg24
reviewed
Jun 12, 2025
aprokop
force-pushed
the
minor_optimization
branch
from
June 13, 2025 14:41
c15dbd2 to
aeeec84
Compare
Contributor
Author
|
Rebased on #1265 and squashed. |
Contributor
Author
Don't have any. This is just an observation not related to any particular problem I've run. |
dalg24
reviewed
Jun 15, 2025
dalg24
dismissed
their stale review
June 15, 2025 08:29
I don't think we should merge until we have confirmed it is beneficial
No need to hammer local counts with atomics, use local variable instead.
aprokop
force-pushed
the
minor_optimization
branch
from
August 25, 2026 18:51
1014b92 to
37beb63
Compare
There was a problem hiding this comment.
Pull request overview
This PR aims to reduce atomic contention in the half-to-full neighbor list expansion path (expandHalfToFull) by using precomputed local offsets and fewer atomics during counting and rewriting.
Changes:
- Optimize
expandHalfToFull()counting by batching per-row increments and skipping empty rows. - Optimize
expandHalfToFull()rewriting by writing the “forward” neighbors without atomics and placing reverse edges from the end of each row. - Refactor/adjust neighbor list fill/copy loops in
ArborX_NeighborList.hpp(but the current HalfNeighborList fill callback no longer matches its count phase).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/spatial/detail/ArborX_NeighborList.hpp | Adjusts how half/full neighbor list entries are filled/copied; currently introduces an inconsistency in HalfNeighborList fill vs count. |
| src/spatial/detail/ArborX_ExpandHalfToFull.hpp | Reduces atomic operations in counting and rewrite phases when expanding a half neighbor list to a full neighbor list. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
aprokop
force-pushed
the
minor_optimization
branch
from
August 27, 2026 16:59
37beb63 to
f27f4a2
Compare
aprokop
force-pushed
the
minor_optimization
branch
from
August 27, 2026 17:15
f27f4a2 to
0613c5f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No need to hammer local counts with atomics, use local variable instead.