Repository navigation
Size two init containers for what they will actually receive - #2833
Merged
grospelliergilles merged 2 commits intoOct 21, 2026
Merged
grospelliergilles merged 2 commits into
grospelliergilles merged 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2833 +/- ##
==========================================
- Coverage 71.42% 71.41% -0.02%
==========================================
Files 2577 2562 -15
Lines 195037 194525 -512
Branches 23135 23051 -84
==========================================
- Hits 139312 138925 -387
+ Misses 47068 46968 -100
+ Partials 8657 8632 -25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
grospelliergilles
requested changes
Oct 20, 2026
grospelliergilles
left a comment
Member
There was a problem hiding this comment.
Thanks for the PR.
Just use C++ static_cast instead of the C style cast
| void resize(Int32 new_size, [[maybe_unused]] bool use_prime = false) | ||
| { | ||
| if (new_size > 0) | ||
| m_new_impl.reserve((uint64_t)new_size, false); |
Member
There was a problem hiding this comment.
Use static_cast instead of C cast
| // The size of a HashTableMapT is a number of buckets and not a number of | ||
| // entries: it rehashes as soon as its count passes 0.85 * nb_bucket, so the | ||
| // table is sized for the load factor and holds every node without rehashing. | ||
| const Int64 wanted_bucket = (Int64)(own_nb_node_xyz / 0.85) + 1; |
Member
There was a problem hiding this comment.
Use static_cast instead of C cast
thdionisi
force-pushed
the
dev/td-opt-init-size-containers
branch
from
October 20, 2026 12:23
86c2157 to
6c343c7
Compare
added 2 commits
October 20, 2026 18:35
Documented as "Resizes the hash table", its body was empty, so the five callers that announce a batch size were not served and the table grew by doubling. 5.3% gain on the mesh build, 8.8% on addCells itself, on a 640k-cell cartesian mesh at one rank.
The size given to a HashTableMapT is a number of buckets, and it rehashes past 0.85 * nb_bucket, so a table sized to the number of entries it will receive always outgrows itself. The mesh is unchanged. 9.4% gain on the initialisation of a 640k-cell cartesian mesh at one rank.
grospelliergilles
force-pushed
the
dev/td-opt-init-size-containers
branch
from
October 20, 2026 16:35
6c343c7 to
a7663fd
Compare
grospelliergilles
self-requested a review
October 20, 2026 16:35
grospelliergilles
approved these changes
Oct 20, 2026
|
grospelliergilles
merged commit Oct 21, 2026
88cf53e
into
arcaneframework:main
69 of 74 checks passed
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.



Two independent one-file fixes on the same theme. ItemInternalMap::resize() was documented as resizing the hash table but had an empty body, so the five callers that announce a batch size were not served. And the size given to a HashTableMapT is a number of buckets, not of entries, so the generator's node table always outgrew itself.
Mesh build −5.3 %, initialisation −9.4 %, on a 640k-cell cartesian mesh at one rank.