4 ms·
Aside from what everyone else said, you should keep in mind that garbage collection != Java memory model. Go has structs and defaults to avoiding boxed values.
by vanderZwan 9y ago
Aside from what everyone else said, you should keep in mind that garbage collection != Java memory model.
Go has structs and defaults to avoiding boxed values. It also has escape analysis and tries to do stack allocation before putting objects on the heap.
Compared to Java, it is a lot easier to write your code in a way that minimises or even avoids generating garbage that has to be collected in the first place.