How 4 bytes of padding make array clearing 49% faster

An alignment quirk on Intel and AMD CPUs: keeping a Go array 8-byte aligned (vs offset 4) makes clearing it up to 49% faster, thanks to how REP STOSQ works.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论