Comment by philosopher1234

9 months ago

I’ve heard that go has very low latency gc, i haven’t heard of it having spikes

The problem with Go is its inadequate FFI, which is important for gamedev which tends to be FFI and syscall-heavy due to embedding another gamescript language and/or calling into underlying rendering back-end, sometimes interacting with input drivers directly, etc.

Which is why C# has been chosen so often (it has performance not much worse than C++ (you can manually optimize to match it), zero or almost zero-cost FFI, and can also be embedded, albeit with effort).

There are also ways to directly reduce GC frequency by writing less allocation-heavy code, without having to resort to writing your own drop-in GC implementation (which is supported but I haven't seen anyone use that new API just yet aside from a few toy examples, I suppose built-in GC is good enough).

  • The overhead for Go in benchmarks is insane in contrast to other languages - https://github.com/dyu/ffi-overhead Are there reasons why Go does not copy what Julia does?

    • Go has non-native stack and has to perform stack switching among other things (hopefully someone with more knowledge than bare minimum required to criticize Go can chime in :D)

      p.s.: mono seems to produce quite a bad result vs .net 6/7/8 huh, time to make a PR