Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But why does Go prioritise low latency? I would think that low latency is not super important for web-servers since there are various other factors adding up to the total latency (what i mean here: time spent between call of the http request to finished receiving all bytes).


Consider jitter, rather than latency. If you're building a video calling service. You don't want random 10ms gaps between your frames.

Also consider fan-out. GC pauses add to the long-tail of latency. If your service depends on many backend services, your overall latency may well depend on the maximum of all your backends.


Processing video in a GC system is best handled like some other things that are continuous ongoing processing without doing a GC.

1. Allocate all your structures up front.

2. Your main video processing loop (or compression, encryption, signal processing, etc) does not do any memory allocation.

This is also like writing games in Java.


It prioritizes latency because it's written by Googlers, and Google prioritizes latency. I don't think we need any more complicated explanation.


From thew point of view of a capacity planner and performance engineer, one goes for low latency first, because for many algorythms, the best throughput is seen when latency is lowest. Some cases will be different, but starting with removing time wasted sitting in a queue is A Universal Good (;-))


... because a typical Google service will have to call many other services to process a request (keyword: fan-out). The effective latency is badly impacted by the _worst_ latencies of these services.


the world of computing isn't just web servers. besides, the vast majority of language implementations already favor throughput over latency when it comes to GC. when latency is a requirement for your project you have no choice but fall back on languages like C. it would be nice to have a viable alternative with managed memory.


There is still hope for a Modula-3 replacement with the ongoing work on Swift, .NET Native, D, Nim.

Even if it still isn't quite here today.


I know you are being facetious but is there actually a connection between Modula-3 and Swift, .NET Native, D, Nim?


Just a set of common features.

Memory safe system programming languages[0] with a GC by default, value types which can be allocated on global data/stack/registers, generic programming, ability to have more control over resource management than just finalizers, allocate memory outside GC control when performance requires it.

[0] .NET Native is not yet there, but is incrementally getting a few of the System C# features


yeah, but when i hear go i think of web servers ;)


It sounds like the Go GC would be well optimized for video games, where a 20ms pause would cause a dropped frame.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: