-
Notifications
You must be signed in to change notification settings - Fork 273
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
System.Memory #94
System.Memory #94
Conversation
…lections, add List and ImmutableArray CopyTo
…benchmarks we generate just random bytes
It's due to the nature of Span - it's stack only, so I can't store it in the field of a class. So I need to create it as part of every benchmark. It's not a problem when it comes to time consuming benchmarks like [Benchmark]
public Span<T> Slice() => new Span<T>(_arrayField).Slice(0, 1) the Span constructor will be a huge part of the benchmark itself (up to 50%) this is why I called the ctor once and used OperationsPerInvoke to amortize the cost of span creation. (the result is
No, because the loop would be an overhead for this particular nano-benchmark |
No, our compiler is not there yet. |
ok, I have covered entire Span, ReadOnlySpan, Memory, ReadOnlyMemory and MemoryMarshaller API with some good benchmarks. I believe the PR is ready for final review |
@jorive this is the last one ;D |
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.
the port is complete now! |
No description provided.