Hacker News new | ask | show | jobs
by guelo 3013 days ago
> if this project gets to a place where it's really awesome but just needs extra speed we can reach for that C++ or Rust book.

The JVM is fast enough for Minecraft, it should be plenty fast for this. But if you ever do want to compile to native then Kotlin/Native would make a lot more sense than a rewrite in a completely different language.

2 comments

> The JVM is fast enough for Minecraft,

That's debatable, the requirements for running a Minecraft server are quite big for what it does and it's very easy to make it lag.

Well, "fast enough" is pretty vague. But bear in mind that Minecraft has never seemed to care about optimisation. For the longest time it was still running Java 7 even when Java 8 with the G1 collector had been out for a long time, and improved performance quite a bit.

HotSpot has a pauseless GC these days from Red Hat and is getting another one developed by the Java team itself, so even Minecraft's very heavy use of GC should be ok (heavy, after the new devs "improved" Notch's code to use objects everywhere instead of passing coordinates in separate parameters).

So far the JVM + Kotlin have been very handy! The coroutines are really cool for doing async stuff and really easy to use.