Skip to content

[tmva][sofie] Don't allocate small constant vectors on the stack#21510

Closed
guitargeek wants to merge 1 commit intoroot-project:masterfrom
guitargeek:sofie_5
Closed

[tmva][sofie] Don't allocate small constant vectors on the stack#21510
guitargeek wants to merge 1 commit intoroot-project:masterfrom
guitargeek:sofie_5

Conversation

@guitargeek
Copy link
Contributor

It simplifies the code a bit if we don't have separate treatment of larger and smaller (n < 100) constant vectors. It's also not that meaningful to have a magic size threshold per vector that also doesn't help avoiding large stack allocations. The mechanism is mute when there are many small constant tensors, so we might as well get rid of it to keep things simple.

It simplifies the code a bit if we don't have separate treatment of
larger and smaller (n < 100) constant vectors. It's also not that
meaningful to have a magic size threshold per vector that also doesn't
help avoiding large stack allocations. The mechanism is mute when there
are many small constant tensors, so we might as well get rid of it to
keep things simple.
@guitargeek guitargeek self-assigned this Mar 5, 2026
@guitargeek guitargeek requested a review from lmoneta as a code owner March 5, 2026 21:53
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Test Results

    20 files      20 suites   2d 21h 5m 58s ⏱️
 3 828 tests  3 827 ✅ 1 💤 0 ❌
69 184 runs  69 175 ✅ 9 💤 0 ❌

Results for commit b273cbb.

Copy link
Member

@lmoneta lmoneta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really needed? I understand the simplification; however, it can be more efficient to have the small tensors allocated on the stack.

@guitargeek
Copy link
Contributor Author

This PR is not strictly necessary, if you prefer to keep it as it is I'm fine too 👍

@guitargeek guitargeek closed this Mar 12, 2026
@guitargeek guitargeek deleted the sofie_5 branch March 12, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants