Optimization Catalog: How 4 bytes of padding make array clearing 49% faster (opens in new tab)
A surprising alignment quirk I learned the hard way: adding 4 bytes of struct padding makes Go's array clearing 49% faster on Intel, all thanks to REP STOSQ.
Read the original article