Benchmarks for ReadOnlySequence.Slice.#589
Conversation
Contains hacks to get it working in VS
cc @adamsitnik, @billwert - what can we do to make the experience within the perf repo better for testing latest? |
| public ReadOnlySequence<byte> MS_RepeatSlice_StartPosition_And_EndPosition() | ||
| { | ||
| var localSequence = _multiSegmentSequence.Slice(_ms_start, _ms_end); | ||
| localSequence = localSequence.Slice(_ms_start, localSequence.End); |
There was a problem hiding this comment.
It's probably better to chose different start/end positions for slicing rather than reusing the same one, but it probably doesn't matter.
|
|
||
| // Add multiple calls for Slice(startPosition, endPosition) | ||
| [Benchmark] | ||
| public ReadOnlySequence<byte> MS_RepeatSlice_StartPosition_And_EndPosition() |
There was a problem hiding this comment.
Can you share the result of this benchmark (along with some of the other missing ones)? I only saw a few mentioned in dotnet/corefx#38431 (comment).
|
So, after addressing @ahsonkhan's comments, I see this when I run the benchmarks. C:\Users\prgovi\Desktop\Work\performance\src\tools\ResultsComparer>dotnet run --base "C:\Users\prgovi\Desktop\Work\Benchmarks\Before" --diff "C:\Users\prgovi\Desktop\Work\Benchmarks\After" --threshold 2%
|
I have fixed that in #594 Now to get it working in VS you should just install the latest Core SDK from https://github.com/dotnet/core-sdk#installers-and-binaries |
…arks so the Slice benchmarks should contain keyword slice
|
@pgovind please excuse me for such a delay in the reviewing process. I am now doing 2.2 vs 3.0 comparison and I really needed these benchmarks so I just pushed the fixes to your branch. PTAL at the changes that I've introduced. |
|
Sample results: dotnet run -c Release -f netcoreapp3.0 --filter SequenceReader
dotnet run -c Release -f netcoreapp3.0 --filter ReadOnlySequence
|
Great. It would be great to verify that we didn't significantly regress ROSequence.Slice between 2.2 and 3.0. |
Contains hacks to get it working in VS
NOT to be merged yet. I'm just putting this up for dotnet/corefx#38431