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 |
|
the port is complete now! |
No description provided.