Skip to content

[DEAD] Improve SkipLast - #9

Closed
Orace wants to merge 1 commit into
atifaziz:masterfrom
Orace:ImproveSkipLast
Closed

[DEAD] Improve SkipLast#9
Orace wants to merge 1 commit into
atifaziz:masterfrom
Orace:ImproveSkipLast

Conversation

@Orace

@Orace Orace commented Oct 31, 2019

Copy link
Copy Markdown

Branch to fix morelinq#626.

We can avoid to consume the full sequence.
We only need O(skipCount) in memory.
The proposed implementation will not fail on an infinite sequence.

@Orace Orace changed the title Fix #626. SkipLast is not optimal in memory Improve SkipLast Oct 31, 2019
@Orace Orace closed this Oct 31, 2019
@Orace

Orace commented Oct 31, 2019

Copy link
Copy Markdown
Author

Closed because CountDown does not store all the element, so it's optimal in memory.
Anyway the current implementation is not really optimal (intermediate object creation, test for null, etc...)
I think that the MoreLinq methods should not call other MoreLinq methods but go straightforward to the most efficient implementation.

@Orace

Orace commented Oct 31, 2019

Copy link
Copy Markdown
Author

Reopened because we want efficient stuffs for MoreLinq

@Orace Orace reopened this Oct 31, 2019
@atifaziz

Copy link
Copy Markdown
Owner

Could you please submit this PR on the main project/repo for reasons laid out in my comment on PR #8? Closing it here meanwhile.

Thanks!

@atifaziz atifaziz closed this Oct 31, 2019
@Orace

Orace commented Oct 31, 2019

Copy link
Copy Markdown
Author

Sorry about that, I forgot I was one level deeper ;)

@Orace
Orace deleted the ImproveSkipLast branch November 5, 2019 14:14
@Orace Orace changed the title Improve SkipLast [DEAD] Improve SkipLast Nov 5, 2019
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.

SkipLast is not optimal

2 participants