Skip to content

cmd/compile: compile taking a long time for large computed struct literals #16361

Closed
@mpvl

Description

@mpvl

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    tip
  2. What operating system and processor architecture are you using (go env)?
    GOARCH="amd64"
    GOBIN=""
    GOEXE=""
    GOHOSTARCH="amd64"
    GOHOSTOS="darwin"
    GOOS="darwin"
    GORACE=""
    CC="clang"
    GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -gno-record-gcc-switches -fno-common"
    CXX="clang++"
    CGO_ENABLED="1"
  3. What did you do?
    Run the attached file.
    main.go.txt
  4. What did you expect to see?
    Sub-second compile times.
  5. What did you see instead?
    16s+ compile times.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions