MRE:
using System.Collections.Generic;
namespace cp;
internal static class Codeforces
{
public static void Main()
{
SortedSet<int> mySortedSet = new SortedSet<int>();
for (int i = 0; i < 1000000; i++) {
mySortedSet.Add(i);
}
Console.WriteLine(mySortedSet.Min);
Console.WriteLine(mySortedSet.Max);
}
}
On codeforces, 358 ms with C#10, and 1030 ms with C#13.
As a control, using https://dotnetfiddle.net/, I get 292 ms using C#10 and 357 using C#13 so yes a bit of an increase but by no means, a factor 3.
I think I've seen another blog talking about C#13 being weirdly slow but I have lost it, I thought a minimal reproducible example with no input parsing would help find the root cause.




