Skip to content

.net 7 cycles Performance slow #78089

@quan0zhou

Description

@quan0zhou

Description

image

    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"
                        }
                    }
                };
            }
        }
    }

Configuration

Regression?

Data

Analysis

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions