Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CollectionIterator improvements #409

Merged
merged 2 commits into from
May 11, 2023
Merged

CollectionIterator improvements #409

merged 2 commits into from
May 11, 2023

Conversation

viceroypenguin
Copy link
Owner

This PR updates a couple missed optimizations in the existing CollectionIterator improvements:

  • Update a couple missed sealed classes
  • Take advantage of TryGetCollectionCount() on certain iterators that don't use CopyTo, that is, they only implement ICollection<> for the .Count optimizations

@viceroypenguin viceroypenguin added this to the 5.1.0 milestone May 10, 2023
@viceroypenguin viceroypenguin enabled auto-merge (squash) May 10, 2023 17:13
@codecov
Copy link

codecov bot commented May 10, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.09 ⚠️

Comparison is base (ea91311) 87.90% compared to head (6b318e2) 87.82%.

❗ Current head 6b318e2 differs from pull request most recent head 1dabdf2. Consider uploading reports for the commit 1dabdf2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #409      +/-   ##
==========================================
- Coverage   87.90%   87.82%   -0.09%     
==========================================
  Files         239      238       -1     
  Lines        7452     7393      -59     
  Branches     1719     1704      -15     
==========================================
- Hits         6551     6493      -58     
- Misses        461      462       +1     
+ Partials      440      438       -2     
Impacted Files Coverage Δ
Source/SuperLinq/PreScan.cs 100.00% <ø> (ø)
Source/SuperLinq/Scan.cs 100.00% <ø> (ø)
Source/SuperLinq/ScanRight.cs 100.00% <ø> (ø)
Source/SuperLinq/Do.cs 100.00% <100.00%> (+2.32%) ⬆️
Source/SuperLinq/Rank.cs 100.00% <100.00%> (ø)
Source/SuperLinq/ScanBy.cs 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Some iterators don't need `CopyTo`, so use any non-enumerated count to take advantage in more places
@viceroypenguin viceroypenguin merged commit d147954 into master May 11, 2023
@viceroypenguin viceroypenguin deleted the collection-iterator branch May 11, 2023 00:15
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