You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The concern is that by having a static analysis pass that coerces users into statically optimized changes that might have adverse effects, like ruining their readability, ruining co-location and cache line blowing.
A compiler pass as @aclements mentioned would solve these issues, but another benefit would be scalable development whereby every Go developer would get these benefits without having to run a separate pass, it won't interfere with code reviews nor blindly make recommendations that few people can reason about.
We can't reorder fields until there is a way to signal "don't reorder fields". That way was going to be and may still be //go:packed (#36606), but that work is put to the side to focus on generics.
Past discussion about reordering struct fields is #10014.
Coming here from an offline discussion with @aclements, in regards to a new static analysis pass "structslop" that Orijtech, Inc. just released and related issues:
The concern is that by having a static analysis pass that coerces users into statically optimized changes that might have adverse effects, like ruining their readability, ruining co-location and cache line blowing.
A compiler pass as @aclements mentioned would solve these issues, but another benefit would be scalable development whereby every Go developer would get these benefits without having to run a separate pass, it won't interfere with code reviews nor blindly make recommendations that few people can reason about.
/cc @cuonglm @martisch @randall77 @aclements @dr2chase @mknyszek.
The text was updated successfully, but these errors were encountered: