On Wed, Mar 6, 2019 at 5:39 AM Viktor Packhuchyi <mr.rubinsht...@gmail.com> wrote: > > As I know Go compiler provide self-managed alignment for fields inside a > structure. > > I don't understand why the fields order must impact additional allocations. > It's not clear for me, why the compiler doesn't manage this automatically. > > Is this a future which I can't understand or a design gap?
I'm sorry, I don't understand your question. Are you asking why the compiler does not automatically reorder fields to reduce memory usage? There is some discussion at https://golang.org/issue/10014. Ian -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.