Skip to content

Feat: sum benchmarks - #1118

Merged
JakenVeina merged 4 commits into
reactivemarbles:mainfrom
giard-alexandre:feat/sum-benchmarks
Aug 7, 2026
Merged

Feat: sum benchmarks#1118
JakenVeina merged 4 commits into
reactivemarbles:mainfrom
giard-alexandre:feat/sum-benchmarks

Conversation

@giard-alexandre

Copy link
Copy Markdown
Contributor

Adds some benchmarks to the Sum aggregate operator.

This is basically a preamble to the full rewrite of the Sum operator, as described in #1031 (comment)

source.AddOrUpdate(replacement, key: id);
replaceChangeSets.Add(source.CaptureChanges());
}
_replaceChangeSets = replaceChangeSets;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

You've generated an invalid sequence of changes for all of these, except for _addChangeSets. source.CaptureChanges() also clears out the changes buffer, so when you get around to sending _replaceChangeSets to your operator, what you've got is nothing but Replace changes that refer to items that never had an Add. Apparently, the existing implementation of .Sum() doesn't care, but your new one might.

@JakenVeina
JakenVeina merged commit be60da6 into reactivemarbles:main Aug 7, 2026
2 checks passed
@giard-alexandre

Copy link
Copy Markdown
Contributor Author

That was quick! Thanks @JakenVeina !

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.

2 participants