I recently recalled that someone in the Go Team—I forget who—said that the Go compiler slowed down a lot after converting from C to Go because the Go GC was freeing a lot of memory that the C code wasn't.
I wonder if an approach like that of memory regions (https://github.com/golang/go/discussions/70257) could be used to hint to the GC that memory allocated in a function doesn't need to be freed unless there is severe memory pressure. For example (for lack of a better name): func main() { runtime.DeferCollection(func() { runCommand() }) } Will -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/433bc550-fbf5-457c-b685-e9ac21a27ecdn%40googlegroups.com.