Live data from Hacker News

Native Minecraft servers with GraalVM Native Image

github.com

91–92 of 92 posts

Re: Native Minecraft servers with GraalVM Native Image

#91
post #16

Earlier quoted context omitted.

> it depends on what the Java client uses for drawing AFAIK, the Java client uses LWJGL, which is a native library.

Thanks for the info! Seems like it's worth trying to compile the Java client with GraalVM Native Image then, given that this exists: https://github.com/chirontt/lwjgl3-helloworld-native

Apparently, someone has managed to compile the Minecraft client to native: https://medium.com/@kb1000/what-youve-done-with-the-server-i...

Re: Native Minecraft servers with GraalVM Native Image

#92
post #31

Earlier quoted context omitted.

Why is this? I thought the JVM already did somewhat decent JIT compilation ... If I understand the article correctly, you're preempting all possibly unoptimized/expensive code paths (reflection) by attempting to literally execute all of them? While it's a cool experiment, isn't it a bit error-prone (besides being a lot of effort of course, but playing Minecraft on the side does sound pretty fun!)?

The JVM is likely to beat AOT compiled java code in almost all cases - but due to Graal having a closed-world assumption (e.g. no unknown class can be loaded, so a non-final class knows that it won’t be overridden allowing for better optimizations, limited reflection allows for storing less metadata on classes, etc) it does allow for significant memory reduction. Also, escape analysis is easier in an offline manner.

can't that all be done speculatively with de-optimization /s
Post reply on HN