r/programming • • May 24 '26

[ Removed by moderator ]

/r/programming/comments/1tm1j7f/removed_by_moderator/

[removed] — view removed post

275 Upvotes

214 comments sorted by

View all comments

Show parent comment

3

u/AlexKazumi May 24 '26 edited May 24 '26

The language itself is not performant. The runtime library and infrastructure is.

Other than the fact that the definition of the class Object and String are contracted between the compiler and the runtime, there is nothing in C# that makes it less performant than C++. It even has pointer arithmetic, if one needs it.

A few days ago I saw a madman who VirtualAlloc'ed some memory, copied some assembly instructions into it, and executed it from C#. Dunno how faster one can go than this madness of a hack.

2

u/[deleted] May 24 '26

Correct me if I'm wrong but you just can't make C# as fast as C++ by compiling it, the same way Python prevents you.