News for hackers. Stuff that matters.
Re:Making a Go program 70% faster with a one character change by cbsmith on Monday November 14, 2022 @04:50PM (#33601716)
In hindsight, I think I chose how to present this poorly, because yes, in this case, the allocation is what is killing the performance. I look at it, and I just see unnecessary implied behaviour creating a performance problem. Usually it isn't the allocations themselves that kill you, but it certainly is the case here.
Re:Making a Go program 70% faster with a one character change by throwaway894345 on Monday November 14, 2022 @06:05PM (#33602665)
I agree with you (I think?) that the implicit allocations are a pain point. I think in the Go case, it is the allocations that kill you most of the time (at least that's the case for me), but in C++ it's more likely to be expensive copy constructors or destructors or so on.