Comment by nayuki
4 months ago
> GC pauses aren't really acceptable
Java has made great progress with low-pause (~1 ms) garbage collectors like ZGC and Shenandoah since ~5 years ago.
4 months ago
> GC pauses aren't really acceptable
Java has made great progress with low-pause (~1 ms) garbage collectors like ZGC and Shenandoah since ~5 years ago.
People have 240hz monitors these days, you have a bit over 4ms to render a frame. If that 1ms can be eliminated or amortised over a few frames it's still a big deal, and that's assuming 1ms is the worst case scenario and not the best.
I don’t think you need to work in absolutes here. There are plenty of games that do not need to render at 240hz and are capable of handling pauses up to 1ms. There’s tons of games that are currently written in languages that have larger GC pauses than that.
What about the C# garbage collector? Is it much better? Because Unity is in C#, right?
Unity uses aginging Mono runtime, because of politics with Xamarin, before its acquisition by Microsoft, migration to .NET Core is still in process.
Additionally they have HPC#, which is a C# subset for high performance code, used by the DOTS subsystem.
Many people mistake their C# experience in Unity, with what the state of the art in .NET world is.
Read the great deep dive blog posts from Stephen Toub on Microsoft DevBlogs on each .NET Core release since version 5.0.
Yes and it's impressive.
For the competitive Minecraft player, I suspect starting their VM with XX:+UnlockExperimentalVMOptions is normal.
A casual gamer is however not going to enjoy that.
Are you sure that enabling ZGC or Shenandoah requires UnlockExperimentalVMOptions ?
Let's get back to the point. Is Java a good gaming language?