Skip to content

cmd/compile: make compiler reorganize user structs without having user code modify fields so userland readability can come first #42428

@odeke-em

Description

@odeke-em

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions