Skip to main content
Benchmark of Querying Special Dictionary Containers

Result

Querying 1,000,000 times with 1,000,000 elements:

Container Mean(ms) Min(ms) Max(ms) Range AllocatedBytes Operations Ratio of Mean(ms)
Dictionary 34.72 30.65 36.33 16% 170 656 1.00x
ConcurrentDictionary 129.94 128.51 131.43 2% 542 60 3.74x
ConditionalWeakTable 168.45 150.94 184.17 20% 542 236 4.85x

Haoyu JiaOriginalAbout 1 minCSharpFundamentalsContainers
CSharp Initialization Sequence of Members

Initialization Order for a Single Instance

Consider a part of CSharp code as follows, and try to guess what is the value of instance.Number:


var instance = new SampleClass()
{
    Number = 3;
};

Console.WriteLine(instance.Number); // What's the value of property 'Number'?

class SampleClass
{
    public int Number {get; set;} = 1;

    public SampleClass()
    {
        Number = 2; 
    }
}

Haoyu JiaOriginalAbout 2 minCSharpFundamentals
Trustworthy Robots in the AI Era

This article is excerpted from an internal report for 'trustworthy AI systems for robots'.

Times Have Changed...

The era of ROS1/2 is coming to an end. They were at vital importance back to the age when we needed to efficiently glue different modules and sensors together, therefore we could stand all of its drawbacks such as intrinsic performance issues and lack of structural design. However, the situation of robotics research has changed since the renaissance of neural-network-based technologies.


Haoyu JiaOriginalAbout 9 minRobots
Useful Commands for Maintaining Docker Servers

Usually there will be containers and images which are no longer in use, yet their creators just forgot to remove them, left them to remain in servers as 'Status: Exited, Last Used: 3 Years Ago'. Unused containers will hold up their images, and every image of those no longer used old versions will hold up 3~5GB disk space.


Haoyu JiaOriginalAbout 1 minDockerServer Maintaince
Welcome to Code Enthusiast!

In this blog, I'll post some of my own reflections on software development or robotic software engineering to the Posts folder, and notes on what I've learned to the Notes folder.


Haoyu JiaOriginalLess than 1 minute