- Joined
- Feb 8, 2008
- Messages
- 1,649
- Reaction score
- 4
- Points
- 38
- Location
- Hampshire, UK
- Website
- orbiter.quorg.org
Performance has always been one of the main criticisms of languages that use a virtual machine (firstly java and then C#), early java was apparently very slow compared with C/C++. However (again, from what I have read) this is now not true in general anymore and whilst the majority of java applications run slower than equivalent native code applications, the difference is negligible (I've heard 2-10% quoted as the norm) and in a lot of cases, this doesn't matter. In some cases, the optimisation in java/C# and the libraries themselves mean that the native code applications have been clocked to run slower than the bytecode. Memory footprint will always be larger in bytecode applcations though due to the VM, but when projects get large, the ~30MB overhead on a 1.5GB footprint again becomes negligible.As for the performance... I can't really tell a difference between the ShuttlePB and the ShuttlePBdotNET in Orbiter, at least not in speed terms.
The performance problems with managed systems are more of the psychological kind, I think.
-----Post Added-----
The joy of languages that compile to run in a virtual machine. As long as your platform has a virtual machine to run it, it can be run on any platform.Something I wasn't aware of before I tried out .NET development for Orbiter - especially OMP - was the capability of .NET being truly platform-independent....but the application itself stays the same. Not only the source-code but the binary.
The thing that's always made me wonder is why java as a language was always hailed as great because it's platform independent. As far as I can tell, this is just the way that it is compiled and thus a feature of the compiler rather than the language*. As far as I know, you could write a compiler for C++ (ignoring all the system-dependent libraries) that would compile the code to bytecode which would then be run on a virtual machine on any platform in exactly the same way.
*I know that java was designed with this in mind and that it's hard to differentiate between the language definition itself and the compilers, but I would see the cross-platform nature of java as a feature of the compiler and implementation rather than the language.
But to use it for Orbiter . . . is that just a wish or is there some way to do that?