Is it creating vectors in the hot path? I'm not seeing it. Go does some escape analysis (the optimization you're referring to), but it's pretty conservative.
A sensible approach for maintainable code but without knowing if a and b are used elsewhere the compiler can't reuse the space they occupy. If C can't figure it out, it can just stick a new one on the stack which doesn't cost too much.
This is, of course, Rust's bread and butter which is probably why it takes the top spot.
This is, of course, Rust's bread and butter which is probably why it takes the top spot.