-
Notifications
You must be signed in to change notification settings - Fork 762
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
Ix optimizations #237
Ix optimizations #237
Conversation
dbeb991
to
e42909b
Compare
ec44685
to
dc71ce7
Compare
{ | ||
var result = await ToArrayWithLength(source, cancellationToken) | ||
.ConfigureAwait(false); | ||
Array.Resize(ref result.array, result.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: can move this to a ToArray
method onArrayWithLength<T>
.
97ff53e
to
59da899
Compare
0b039e1
to
3ece9f4
Compare
/cc @aelij for any code review feedback |
|
||
public Task<int> GetCountAsync(bool onlyIfCheap, CancellationToken cancellationToken) | ||
{ | ||
return Task.FromResult(source.Count()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Count
instead of Count()
since source
is an IList
.
…eateEnumerator/CreateEnumerable to document requirements
…d diagnostic ability
f9ae103
to
ea63796
Compare
This PR is to optimize Ix Async by incorporating the patterns used in https://github.com/dotnet/corefx/tree/master/src/System.Linq/src/System/Linq, taking advantage of the thought leadership and performance reviews of that codebase.