Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: fast build mode/flag #16091

Closed
kokizzu opened this issue Jun 17, 2016 · 4 comments
Closed

cmd/compile: fast build mode/flag #16091

kokizzu opened this issue Jun 17, 2016 · 4 comments

Comments

@kokizzu
Copy link

kokizzu commented Jun 17, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    1.4.3
    1.7.0b1
  2. What operating system and processor architecture are you using (go env)?
    amd64 darwin
  3. What did you do?
    just normal daily edit-compile-debug.
    not an error, just an idea for faster compilation, for edit-compile-debug cycle (including restarting webserver), it would be nice to have --fast-compile mode even the compile binary not optimized is ok, as long it's fast to compile
  4. What did you expect to see?
    not waiting too long
  5. What did you see instead?
    for each cycle,
    waited about 4 seconds in 1.4 on linux
    waited about 6 seconds in 1.4 on mac
    waited about 8 seconds in 1.7b1 on mac
    this still too much..
@sergeylanzman
Copy link

set GOGC=false for go build => 20%-30% fast
set ssaEnabled flag false => maybe help for compile time(only 1.7)

@quentinmit quentinmit changed the title cmd/compile feature request: fast build mode/flag cmd/compile: fast build mode/flag Jun 17, 2016
@quentinmit quentinmit added this to the Unplanned milestone Jun 17, 2016
@quentinmit
Copy link
Contributor

/cc @randall77 @dr2chase

I'm not sure there really is all that much we could do to trade off optimizations for speed.

@ianlancetaylor
Copy link
Contributor

Use -gcflags=-N to turn off the optimizers.

I agree we need to keep making the compiler faster, but I don't think it's a good idea to encourage different compilation modes unnecessarily.

@ALTree
Copy link
Member

ALTree commented Jul 18, 2017

GOGC=off to turn the GC off and -gcflags=-N to turn the optimizer off are two things that definitely help speeding up compilation.

Looks like the idea of a new --fast-compile flag was rejected, so I'm closing this issue.

@ALTree ALTree closed this as completed Jul 18, 2017
@golang golang locked and limited conversation to collaborators Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants