Skip to content

Feat: sum benchmarks#1118

Open
giard-alexandre wants to merge 3 commits into
reactivemarbles:mainfrom
giard-alexandre:feat/sum-benchmarks
Open

Feat: sum benchmarks#1118
giard-alexandre wants to merge 3 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.

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