2 ms·
Also stack allocation and pervasive use of value types help C++ a lot in practice. This reduces overhead of heap metadata. There's also the overhead of .NET wra
by pcwalton 11y ago
Also stack allocation and pervasive use of value types help C++ a lot in practice. This reduces overhead of heap metadata. There's also the overhead of .NET wrapper objects for OS resources--compare a .NET window object to an HWND, the latter of which is just a word-sized opaque ID describing a kernel managed resource.
Though GC has its own advantages too--the ability to compact being the main one.