Creator, on 30 November 2015 - 06:59 PM, said:
This is a common misconception about Java. It isn't slow. According to benchmarks, it's actually quite fast. The JIT makes it able to keep up with C in real world applications. Occasionally, Java can even beat C, because of its ability to consolidate optimizations between libraries (optimizations through dynamic linking). Truthfully, it will often be on the wrong side of C, and perform marginally slower. But it's forgivable, and still very fast.
Java's performance problems come in the way of the garbage collector, and programming poorly for it. Minecraft is so much less performant than its Win10 and mobile C/C++/C# (whichever it is) equivalents because those versions have been properly optimized, and aren't destroying a GC. Java Minecraft is written such that it hammers the GC, which slows it down significantly.
That said, I have no evidence to claim whether LuaJ is slower or faster than Lua. That's dependent on how well / poorly LuaJ and Lua are written. I'd have to look at benchmarks.
Edited by ElvishJerricco, 01 December 2015 - 03:52 PM.











