Object pools are really easy.
Unsafe is only for extreme cases. Some cache libraries use it. You don't have to code it yourself.
Yes this is better than relying on the end user/admin to tune things. It is more predictable.
func main() {
n := 1
fmt.Println(n)
}
Object pooling won't help here.The new GCs on the JVM have very few parameters to tune, I think Shenandoah or ZGC have only two parameters to set up, can't get much simpler.
Escape analysis was just rewritten, and the objective is to handle this case more gracefully.