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
unknown Bug/NotBug about span benchmarks #54758
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
The |
thanks, you are right but in sharplab the "Span_ForEach" method are just one and have one body:
but in asm in debug mode in my machine yes "Span_ForEach" have different body if i thought correct. look like they are optimized in different way but i don't expect this different.
and look like that problem can lead same problem in span performance. so in my benchmark which i told at first of this issue that are 1.43x slower than other class. like what found in #54672 |
This is a memory alignment issue, I've provided full answer in dotnet/BenchmarkDotNet#1733 (comment) |
Description
i don't know this is a bug or not, recently i saw an issue about performance impact in spans: #54672
i use that benchmark but i got unexpected strange result, i use a class as base of benchmark and other classes as sub benchmark. there isn't no benchmark in sub classes and they are just for test something which was strange for me and the benchmark was only in base class. when i test same method then results was different but i don't use any method in sub classes. i don't know what is the problem here and come from my codes or not because i'm not professional at this field.
the bench repo
Configuration
BenchmarkDotNet=v0.13.0, OS=Windows 10.0.19043.985 (21H1/May2021Update)
.NET SDK=5.0.100
[Host] : .NET 5.0.0 (5.0.20.51904), X64 RyuJIT
DefaultJob : .NET 5.0.0 (5.0.20.51904), X64 RyuJIT
Benchmark
Sub Benchmarks
Benchmark Results
Benchmarks1 class:
Benchmarks2 class:
Benchmarks3 class:
The text was updated successfully, but these errors were encountered: