Skip to content

Fix avoid unnecessary map copy in SScalar::eval()#66

Merged
oberbichler merged 2 commits into
mainfrom
fix/sscalar-const-ref
May 17, 2026
Merged

Fix avoid unnecessary map copy in SScalar::eval()#66
oberbichler merged 2 commits into
mainfrom
fix/sscalar-const-ref

Conversation

@oberbichler

Copy link
Copy Markdown
Owner

SScalar::eval() accepted its Data parameter (an std::unordered_map) by
value, causing a full copy of the map on every call. Changed the signature from
Scalar eval(const Data d) const to Scalar eval(const Data& d) const to
pass by const reference instead.

@oberbichler oberbichler merged commit 20a4b77 into main May 17, 2026
6 checks passed
@oberbichler oberbichler deleted the fix/sscalar-const-ref branch May 17, 2026 05:13
@oberbichler oberbichler changed the title fix: avoid unnecessary map copy in SScalar::eval() Fix avoid unnecessary map copy in SScalar::eval() May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant