I also came across this video: “Godot 4.3 Performance: Part 2 – Compare C++, C#, Java, GDScript” (YouTube):
Since Godot is built in C++ and also supports JVM bindings (e.g. for Android), I was wondering if you have any internal performance insights or informal comparisons between C++ and Java for game-engine workloads.
Not asking for a formal benchmark just curious whether you have general observations or experience regarding startup time, runtime performance, memory behavior, etc.
Well that is a good holywar starter.
I imagine in a real world scenario just having to deal with JNI will drag the performance down for Java. I’d be great if someone actually made a game in two languages to see the difference.
Keep in mind that video compares a version of Godot that is 2 versions old and one year old now. That’s very old for Godot. I mention this because there have been huge performance gains in the execution of GDScript in that time in certain areas. It is comparable in speed to C# in many areas which it formerly was not.
Furthermore, the current development version (4.6) is re-implementing the way C# works so that it will use GDExtension - and the team is using it as a test language with the goal of paving the way to improvements for all other languages (ie, Java). (Actually, C++ uses GDExtension too, but I don’t know how it will be affected by this.)
I’ve been active almost every day for the last year on this forum, and I have not once seen anyone talk about using Java on here - until now. So I suspect there aren’t going to be many people on this forum with experience using Java with Godot.
It is also worth noting that there is technically only Kotlin support for Godot, and there will likely never be actual Java support. So you can compare JVM performance to other languages, but not Java directly. (Which may be a bit too pedantic for your question.)
At this point in Godot’s lifecycle, the performance gaps are becoming smaller between the languages. You will find a lot of discussion on here about GDScript vs C# vs C++ on here, and that might help you form an opinion about Java.
Ultimately if someone came here asking if they should use Java for Godot I would personally recommend they learn GDScript for a plethora of reasons.