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

won't slice of span<T> be a better solution #411

Closed
erwan-joly opened this issue Aug 3, 2018 · 3 comments
Closed

won't slice of span<T> be a better solution #411

erwan-joly opened this issue Aug 3, 2018 · 3 comments

Comments

@erwan-joly
Copy link

wouldn't slice of span be a faster/better solution for this slicing system ?https://github.com/Azure/DotNetty/blob/f227f95966c6380aee8d07c6f786873e974e3f8a/src/DotNetty.Common/Utilities/ArrayExtensions.cs

@nayato
Copy link
Member

nayato commented Aug 3, 2018

Considering
a) this piece was written 3 years ago
b) Spans are not in .NET Standard yet and will never be in .NET Standard v1.3
comment is misplaced. Now focusing on point b) specifically, it would be a breaking change or an uncontrollable spread of #ifs across the code.
We are aware of Spans/Memory and its benefits, it is just not there yet in terms of adoption.

@nayato nayato closed this as completed Aug 3, 2018
@simonlaroche
Copy link

simonlaroche commented Aug 3, 2018 via email

@erwan-joly
Copy link
Author

The question was mostly to know if it would be better and in that case I would have done it and PR. I know it was not here 3 years ago. I haven’t thought about the net standard version.
My question was mostly to know if it would be better and won’t get any breaking change with span. To avoid doing a useless piece of work.
Seems the answer is yes it would be better but it would be a breaking change so don’t do it.

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

No branches or pull requests

3 participants