3 ms·
This conflates the language, a particular implementation of that language, and a particular runtime that said implementation uses. As far as the language goes,
by int_19h 8y ago
This conflates the language, a particular implementation of that language, and a particular runtime that said implementation uses.
As far as the language goes, you can do anything in C# that you can do in C in terms of memory-unsafe programming - raw pointers, pointer arithmetic, unions, allocating data on the stack - it's all there, and it's not any harder to use. Since semantics are the same, it should be possible to implement it just as efficiently as in C. At that point, the only overhead that you can't remove by avoiding some language feature or another is GC, although you can avoid making any allocations through it. So the real question is whether a language with GC can be considered low-level.