https://go.dev/doc/go1.25#faster-slices

To be pedantic, Go has allocated objects on the stack since forever. The
new thing is the backing store for slices with non-constant sizes.

There's more of this ilk coming, for example
https://go-review.googlesource.com/c/go/+/707755

On Tue, Jan 6, 2026 at 5:51 AM Alexander Shopov <[email protected]> wrote:

> Hi all,
>
> Does anyone know whether and if at all there was an announcement that Go
> now stack allocates objects with size < 32 bytes? I read the 1.25/1.24
> Release notes but if it is there I am missing something obvious.
>
> This questions is based on this talk from the last GopherCon:
>
> NL GopherCon 2025: Understanding Escape Analysis to Speed Up Your Code -
> Bill Kennedy: https://www.youtube.com/watch?v=FUm0pfgWehI&t=974s
> (16m15s):
>
> I believe it is Keith Randall answering - but the answer is that now
> values smaller than 32 bytes are stack allocated (provided escape analysis
> agrees).
>
> There is also another reply from the room about why a particular value is
> escaping. Any info on that would be helpful.
>
> Kind regards:
> al_shopov
>

-- 
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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/golang-nuts/CA%2BZMcOOB_2M-ashLBjobWkWGpsh4EEtanBn8WjMnXNZy4okH%3DA%40mail.gmail.com.

Reply via email to