-
Notifications
You must be signed in to change notification settings - Fork 270
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
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? |
src/benchmarks/micro/corefx/System.Memory/ReadOnlySequence.SequenceReader.cs
Outdated
Show resolved
Hide resolved
src/benchmarks/micro/corefx/System.Memory/ReadOnlySequence.SequenceReader.cs
Outdated
Show resolved
Hide resolved
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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