3 ms·
What kind of memory management do you need that Go doesn't provide? It's not too hard to write Go to minimize allocations (and most short lived allocations end
by d4l3k 9y ago
What kind of memory management do you need that Go doesn't provide?
It's not too hard to write Go to minimize allocations (and most short lived allocations end up on the stack anyways unlike other languages [1]). If you really need a lot of allocations you can always use https://golang.org/pkg/sync/#Pool https://golang.org/pkg/sync/#Pool to avoid GC overhead.
[1] https://groups.google.com/d/msg/golang-nuts/KJiyv2mV2pU/wdBUH1mHCAAJ https://groups.google.com/d/msg/golang-nuts/KJiyv2mV2pU/wdBU...
- brian-armstrong 9y agoBut if you're doing that, you might as well just use a language with RAII, good scoping and unique pointers. A language like... C++