4 ms·
The Google Go team lives in a completely different environment. Their perspective of performance is not the same as a game dev. Go 1.5 stated their goal was 10m
by dottrap 11y ago
The Google Go team lives in a completely different environment. Their perspective of performance is not the same as a game dev. Go 1.5 stated their goal was 10ms GC latency. A game loop is 16ms for a 60fps game. 10ms is not close to acceptable. Fast for a web server backend, but not fast for a game.
- _ph_ 11y agoI have not experimented with the Go GC under heavy loads yet, but the important points of 1.5 are, that the GC pauses have an upper limit of about 10ms for multi-gigabyte heaps - previously they could be up to a second, and often are much faster (in a game environment with smaller heaps, they might actually as low as 1ms, which would be acceptable). I wrote, that there might be further tweaks required, i.e. having an API to call the GC for a set number of milliseconds. If your code isn't 100% using the time slice for each frame, it could use the remaining part of each time slice for garbage collection, eliminating the need for blocking stops. So, whether Go is acceptable now entirely would depend on some measurements. And if not, could be possibly tweaked. As I wrote, I would rather count this under "environment" where C might still win.