News for hackers. Stuff that matters.
Re:Making a Go program 70% faster with a one character change by kevincox on Tuesday November 15, 2022 @06:43AM (#33607986)
> notably, if you're passing data into a function by pointer, it's not going to allocate

Isn't it still possible for the value to escape here? For example the callee could stick it until a global data structure.

In fact it seems like a pointer passed to a function would need to be on the heap "by default" unless the compiler can prove that it doesn't escape.

Re:Making a Go program 70% faster with a one character change by throwaway894345 on Tuesday November 15, 2022 @08:30AM (#33608905)
Yeah, you’re probably right.