Hacker News new | past | comments | ask | show | jobs | submit login

I wonder when will .NET get a SOTA low pause time collector like openjdk has with both ZGC and Shenandoah Seems even more critical as C# is widely used for games



Most of .NET is moving towards avoiding heap allocations altogether, the latest versions improved a lot in that sense. A great example is the new System.Text.Json API, that can serialize/deserialize JSON documents up to 1 MB with 0 heap allocations, using ArrayPool


Which is great for Greenfield projects with engineers that keep up to date with these latest developments.

If one chooses to pour time into improving the GC instead of the language, the benefits are reaped both by existing projects and new projects by old-school developers.


Some of these changes are happening in the runtime itself, so many projects will get benefits just by updating to a newer version (something you would have to do anyway to get GC improvements).

For example, System.Text.Json is the default in ASP.NET Core 3.x, updating to 3.0 would use it instead of Json.NET unless you explicitly opt-out.

In the same way many APIs are starting to accept Span<T> in addition to IEnumerable<T>, Lists or arrays, so it's easy to opt-in into that. Other APIs are using it internally to avoid copies, so you don't need to do anything to get benefits.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: