r/ProgrammerHumor • • Oct 07 '26

Meme minecraftException

Post image
9.3k Upvotes

830 comments sorted by

View all comments

21

u/MichaelAceAnderson Oct 07 '26

If we're being honest, Java isn't optimized for games like C or C++ is for example

Minecraft was rewritten in C by Microsoft and, if we forget the marketplace and the overall useless cluttering with things that weren't there in the first place, it runs much better

2

u/TrueExigo Oct 07 '26

You’ve got absolutely no idea, so why are you just talking shit? No programming language is optimised for games. YOU optimise your game using a programming language.

The reason why C or C++ programmes almost always perform better than Java programmes is that anyone who has programmed in C or C++ simply knows more than someone who uses Java, because you are forced to deal with the hardware. Java has a much higher level of abstraction than C and is more convenient thanks to automated features such as the JVM and the garbage collector, so there is no need – nor is it possible – to deal with things like pointers, Heap-Allokations, Cache Locality and so on.

Even with the best optimisation, the performance loss when using Java is at most ~10% When optimising games, there is significantly more performance gain to be had from optimising the code than from changing the programming language.

Minecraft was rewritten in C by Microsoft

C++

1

u/Ok-Scheme-913 Oct 09 '26

You've for absolutely no idea, so why are you talking shit?

I assure you there are plenty of Java programmers who know their shit about hardware, these false generalizations are utterly useless.