I’m wondering what your experiences are with XOJO and compiled apps as far as speed? I mean, all things being equal, what kind of speeds do you get compared to C++ or some other languages such as C Sharp, etc? Anyone studied these type of comparisons I’m wondering?
I have done some extensive comparison with code that is very math intensive (long runs with no I/O or GUI interaction). For code such as integer factorization and FFT multiplies the difference is dramatic. I have seen a difference of 26X and higher with equivalent code in C++ as compared with XOJO.
Yeah, the current compiler backend is definitely non-optimizing. For 64-bit builds, the compiler is going to leverage LLVM’s optimization pipeline and code generation. While it’s never going to generate code that’s as fast as C++, it is a definite improvement. I’ve seen a 15x performance increase with the LLVM backend on math-heavy code, but the increase is entirely dependent on type of code and how it’s written.
The fundamental and unavoidable limitations come from language features like exception handling, deterministic reference counting, nil object checks, bounds checks, overflow checks, and object overhead. There’s a bunch of other things in the way before getting even near a hypothetical maximum speed though, including the internal design of the compiler.
As Michael Diehr has shown us with his rc4 example, xojo is fit to iterate through complex encryption/decryption in a pretty fast time with reasonable results and compareable with other languages like C or C++ except you’re using external Libs written in pure Assembler I guess.
This may be important in science but has nothing in common with modern business software development enviroments. In fact benchmarks for langauges are quite useless when you can make use of external Engines/libs/dlls or even run certain tasks complete out of your software via helper apps through shell/ threads etc.