4 ms·
> Second, performance is as good or better than pretty much anything else that is not optimized C or C++ You are kind of overlooking the JVM here. Also Mono i
by Raphael_Amiard 14y ago
> Second, performance is as good or better than pretty much anything else that is not optimized C or C++
You are kind of overlooking the JVM here.
Also Mono is kind of portable, and .Net on windows is fast, but you can't really have both (even if Mono performance is decent)
- codewright 14y ago>You are kind of overlooking the JVM here I did criticize OP too, but you'll note that he made a point of saying that C# was nicer than Java. The fact that he isn't aware the JVM has more than just Java, is an issue I attempted to redress.
- throwAway7936 14y agoHow can you claim that I'm not aware that the JVM is more than Java? I did not even mention the JVM.
- qznc 14y agoTheoretically, the CLR-VM should be able to reach better performance than the JVM, since it has value-types. Within the JVM an array of some objects is really an array of references, which is bad for your hardware caches and requires an additional pointer dereference. The question is how significant that is for non-numerical applications.
- Someone 14y agoTheoretically, your sufficiently advanced compiler and/or JVM will figure out where they can replace objects by value types. So, theoretically, that does not matter. The difference should be visible in practice, though. AFAIK, it is not really visible, though. That probably is because the JVM has been tuned longer.
- migueldeicaza 14y agoIn practice, value types are a huge performance differentiator. That is why even the simplest benchmarks involving value types tend to beat Java's optimized code gen.
- azth 14y agoIsn't Scala 2.10 introducing value types that are beneficial for situations like this? I don't know about any potential limitations though.
- migueldeicaza 14y agoIn Mono we cheat. We cheat, because we are able to use the work of the brilliant hackers over at LLVM. So in addition to Mono's code gen, you can opt into using LLVM, like this: mono --llvm myBenchmark.exe It take a lot longer to start, compared to Mono's fast-JIT, but for any long-running HPC, financial simulation or physics simulation, you can not get better than this. The speed of LLVM, the safety and productivity of C# (or F#)