2 ms·
> Except for optimized C and C++ there is no popular language (I'm talking about the performance that is due to the design of the language, _not_ a particular i
by snogglethorpe 14y ago
> Except for optimized C and C++ there is no popular language (I'm talking about the performance that is due to the design of the language, _not_ a particular implementation. For example dynamic typing is necessarily slower.) that is faster than C#.
Er, but you can't just completely disregard implementation, because it really matters in practice. You're not going to get a lot of adoption simply because your language is theoretically better/faster/...
In these language shootouts, Lua, a dynamically-typed language aimed at small size and simplicity, regularly beats out C#, because Lua has LuaJIT[+], which is a really good implementation, whereas C# for many people means Mono, which is at best an "OK" implementation.
It's the same as with algorithms: big-O complexity is obviously important, but it isn't everything; for real-world uses, the constant factors may make all the difference...
[+] The standard Lua implementation is also very good, but it's a more typical VM, and while very fast for a non-JIT VM, can't match LuaJIT in many cases.