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

Add support for Span<T> #8

Closed
jackmott opened this issue Nov 16, 2017 · 6 comments
Closed

Add support for Span<T> #8

jackmott opened this issue Nov 16, 2017 · 6 comments

Comments

@jackmott
Copy link
Owner

We should add support for Span, which would allow the use of these functions on stackalloc arrays and other memory sources. If we targeted only .NET 2.0 we could change the function signatures of all methods taking arrays to Spans, but if we want to support .NET Framework and Core 1.0 we need to duplicate every array function, and make a Span version.

As well, performance opportunities may exist if we use stackalloc arrays when appropriate inside our implementations.

@jackmott
Copy link
Owner Author

More research on this:
If we merely changed all array methods to take spans, then people using LinqFaster from .NET Framework would take a big performance hit. So we would need to duplicate each function to have array and span versions. Maybe something that could be automated, as it is a lot of grunt work.

@jackmott
Copy link
Owner Author

jackmott commented Feb 1, 2019

span support added

@jackmott jackmott closed this as completed Feb 1, 2019
@BrunoZell
Copy link

Any plans to support ReadOnlySpan<T> too? As of now, it looks like the work of duplicating the functions isn't automated.

@Smurf-IV
Copy link

Any plans to support ReadOnlySpan<T> too? As of now, it looks like the work of duplicating the functions isn't automated.

See "https://github.com/Smurf-IV/LinqFaster"

@BrunoZell
Copy link

#20

@ndrwrbgs
Copy link

@BrunoZell if you could open a new issue for that? It seems a bit (related but) tangential to this one
@Smurf-IV if you could break up the review that'd be wonderful :-P Or specific exactly what features to add, so that someone else can add them as smaller reviews that can be reviewed with higher precision/recall (due to better focus area of change)

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

No branches or pull requests

4 participants