Check out https://github.com/dominikh/go-tools/tree/master/cmd/structlayout
and https://github.com/dominikh/go-tools/tree/master/cmd/structlayout-optimize
On Wednesday, February 6, 2019 at 8:20:06 PM UTC-8, Kurtis Rader wrote:
>
> > Is it practical to auto rearrange struct fields to reduce padd
> Is it practical to auto rearrange struct fields to reduce paddings in Go?
Auto rearrange? Probably not. Manual rearrange? Maybe, if the struct isn't
part of a public API. If the struct is part of a private API removing the
padding could be counterproductive or harmful to performance if the layou
.
--
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.