Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Span<T> #77

Open
ctaggart opened this issue Dec 21, 2017 · 4 comments
Open

Span<T> #77

ctaggart opened this issue Dec 21, 2017 · 4 comments

Comments

@ctaggart
Copy link
Owner

https://twitter.com/funcOfJoe/status/943671450677927936

Span lands in .NET! We began this journey in Midori 10 years ago, a magical elixir of perf and safety. A heartfelt congratulations go out to the team for all the hard work shipping it, many of which stuck it out all these years. A labor of love! https://msdn.microsoft.com/en-us/magazine/mt814808?f=255&MSPPError=-2147217396

https://twitter.com/khellang/status/943778553111433216

One thing I was pleasantly surprised by is the how complete the span support is across the BCL now. Almost very single API that takes a byte array now supports spans ❤

I used the dotnet-core MyGet feed. Target netcoreapp2.1 and just pick a recent preview1 version for RuntimeFrameworkVersion 😊

cc @jhugard

@jhugard
Copy link
Collaborator

jhugard commented Apr 19, 2018

Nice replacement for ArraySegment with vastly superior utility - plays nice with all container types and enumerators. Could consider moving ZeroCopyBuffer, et al. to this, but that will break compat with older versions of mono, Unity and CLR.

@ctaggart
Copy link
Owner Author

Introducing .NET Core 2.1 Flagship Types: Span T and Memory T
https://www.codemag.com/Article/1807051/Introducing-.NET-Core-2.1-Flagship-Types-Span-T-and-Memory-T

@ctaggart
Copy link
Owner Author

ctaggart commented Jul 9, 2018

@jhugard
Copy link
Collaborator

jhugard commented Jul 10, 2018

Sweet! Shouldn't be too hard to replace ZeroCopyBuffer with PipeReader + PipeWriter and get far better buffer control (and probably better performance).

Note, though, that Unity has problems with SignelR on iOS. No idea if this carries over to System.IO.Pipelines. Note also that await support is required, so older Unity would be a non-starter.

LMK if there's strong interest. Maybe I can give it a go on a branch...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants