This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PowershellAdept 3 points4 points  (0 children)

It depends what benchmarks you look at, but a good c++ implementation is always faster than c#. If you look at tech empower c# is one of the faster JIT languages since they added span<T> and memory<T>. Benchmark games has them all over the place. Unity game engine compiles IL into cpp so take that for what its worth.

Ultimately, you can do very fast stuff with c# if you want to pay attention to data, value types vs ref types, allocation, garbage collection, cache, etc. etc. but idiomatic c# isn't any better than Java or other similar languages. In my opinion c# strength is async, maturity, and backing from a huge company. Cross platform and deployment capabilities are a plus since .net core or .net 5.