-
Notifications
You must be signed in to change notification settings - Fork 280
Add microbenchmark for core UnmanagedMemoryStream scenario #3435
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
Conversation
src/benchmarks/micro/libraries/System.IO/UnmanagedMemoryStreamTests.cs
Outdated
Show resolved
Hide resolved
[GlobalSetup] | ||
public void Setup() | ||
{ | ||
buffer = (byte*)Marshal.AllocCoTaskMem(Length); |
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.
Just wondering why you chose this over AllocHGlobal?
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.
No particular reason. Either of these two would work just fine for this test.
src/benchmarks/micro/libraries/System.IO/UnmanagedMemoryStreamTests.cs
Outdated
Show resolved
Hide resolved
src/benchmarks/micro/libraries/System.IO/UnmanagedMemoryStreamTests.cs
Outdated
Show resolved
Hide resolved
src/benchmarks/micro/libraries/System.IO/UnmanagedMemoryStreamTests.cs
Outdated
Show resolved
Hide resolved
Failures are unrelated. |
Related to dotnet/runtime#93766