-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
.net 7 cycles Performance slow #78089
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. |
@eiriktsarpalis, @krwq, here's an allocation trace with the repro but for only 1,000 iterations instead of 100,000 iterations. On the left is .NET 6, on the right is .NET 7: |
Superficially, this appears to only be creating DOM instances without performing any serializations, so I'm surprised that any |
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsDescription public class BenchmarkSum
{
private JsonObject[] _jsonObjs;
[GlobalSetup]
public void Setup()
{
_jsonObjs = new JsonObject[100000];
}
[Benchmark]
public void Sum()
{
for (int i = 0; i < 100000; i++)
{
_jsonObjs[i] = new JsonObject()
{
["aaa"] = 1,
["bbbb"] = 2,
["cccc"] = new JsonArray()
{
new JsonObject()
{
["aaaa"] = "aaaaa",
["ffffff"] = "ffffffffffffff"
}
}
};
}
}
} ConfigurationRegression?DataAnalysis
|
@eiriktsarpalis, I assume the intent was for this to be static?!
|
Description
Configuration
Regression?
Data
Analysis
The text was updated successfully, but these errors were encountered: