4 ms·
> How did we get here? Well, C++ and its stupid O(n^2) compilation complexity [...] Wasn't large compilation time a driving force behind coming up with Go? Is
by treehau5 9y ago
> How did we get here? Well, C++ and its stupid O(n^2) compilation complexity [...]
Wasn't large compilation time a driving force behind coming up with Go? Is a garbage-collected language not suitable for a web browser? I am just curious because I absolutely love writing Go
- wbl 9y agoGC performance is a trade between throughput and pause time. There are tricks you could play with each tab in its own heap which is entirely discarded on page change, but I think it would take something expensive like Azure to really work.
- treehau5 9y ago> GC performance is a trade between throughput and pause time. Go has sub-millisecond GC pauses, and even at that minimizes the need to do stop-the-world pauses (previous HN discussion https://news.ycombinator.com/item?id=12821586 https://news.ycombinator.com/item?id=12821586) I think it would be a very interesting exercise to give a crack at it. If anyone is interested, let me know.
- codygman 9y ago> Go has sub-millisecond GC pauses At the cost of throughput: > Go optimises for pause times as the expense of throughput to such an extent that it seems willing to slow down your program by almost any amount in order to get even just slightly faster pauses. - https://blog.plan99.net/modern-garbage-collection-911ef4f8bd8e https://blog.plan99.net/modern-garbage-collection-911ef4f8bd...
- jdc0589 9y ago> Wasn't large compilation time driving forces behind writing Go yes, that was one of the tenants. > Is a garbage-collected language not suitable for a web browser? In theory its fine; but there's a lot of historical baggage that comes along with garbage collection and the majority of languages that support it (e.g. almost no value types). Golang fairs pretty well latency wise for a GC'd language. I'd be curious for someone with more experience than me to talk through a deep dive of instances where go's latency/throughput characteristics are and are not good enough for specific applications.
- pjmlp 9y agoWe have Java to blame for it. With the exception of Smalltalk and its derivatives, all the GC enabled languages that came before Java had value types, even Lisp.