3 ms·
JITs precisely can provide runtime performance optimizations. What makes C#/Rust special? If you can't name anything in rust that would actually effect the dat
by mhh__ 5y ago
JITs precisely can provide runtime performance optimizations.
What makes C#/Rust special? If you can't name anything in rust that would actually effect the dataflow analysis then you may need to reconsider.
- FridgeSeal 5y agoRust having one of the most sophisticated optimising compiler backends? And a whole suite of language design choices that enable fast, correct code?
- mhh__ 5y agoThe parent comment is clearly talking about language design rather than the backend. I say this because I often see Rust people say isn't a great that rust can do xyz and then I look into it and it's actually just basic dataflow analysis that any compiler does or just LLVM being clever.
- dehrmann 5y agoA JIT gives you the ability to target the current CPU better.
- osigurdson 5y agoI'd say the primary factor is that C# has a garbage collector while Rust does not. C# and Rust are not really in the same league in my opinion. C# is more of a Java and Go competitor while Rust competes with C for the most part.
- mhh__ 5y agoThat's very dependant on the program being worked on. Garbage collection can make certain programs harder but I promise you can write absolutely awful memory allocators in any language.
- int_19h 5y agoC# has some features that make it lower-level than Java or even Go. For example, it has pointers with pointer arithmetic, C-style unions, and explicit stack allocation of structs and arrays. In fact, the only two things in C that doesn't have a straightforward and efficient 1:1 translation to C# are signals and setjmp/longjmp (although the latter still maps very closely to exceptions).