3 ms·
Same for C#. It's a little weird that it's used in games, but doesn't have a low latency GC.
by zigzag312 3y ago
Same for C#. It's a little weird that it's used in games, but doesn't have a low latency GC.
- neonsunset 3y agoC# needs GC less desperately so than Java because of structs, stack allocated buffers, heavy use of all manners of object pooling and easy access to malloc and free (which Unity uses in the form of NativeArray). You can achieve drastically lower allocation rate in C# (or no allocations at all if you really need to).
- indolering 3y agoThere are similar strategies employed by high frequency traders using Java. Not as ergonomic as in C# (which I believe had this as a forethought) but interesting all the same.
- pjmlp 3y ago.NET has been designed since the beginning to handle C++, C# already had some of the features but not all of them, in some cases it was needed to emit MSIL, or use Managed C++ on .NET 1.0, or C++/CLI since .NET 2.0. The improvements on C# 7 and later are exactly to avoid emiting MSIL manually, and also cut the dependency on C++/CLI, as it is Windows only.