-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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/go: increase in compile time in 1.12beta2 compared to go1.10.7 #29743
Comments
Thanks for checking that the slow-down didn't happen on 1.11 - I was about to ask that. Does this happen only on certain projects, or can you reproduce this build slow-down even on a small "hello world" package build? What if you disable CGo entirely via |
Could also be interesting to investigate if it's /cc @randall77 @ianlancetaylor @dr2chase - I believe some of the people in the Go team run OSX too, so perhaps they can investigate. |
I don't see any major differences here. Tip might be 7% slower than 1.11 and 15% slower than 1.10.
|
BTW, that was on Linux. I'll try again on my mac when I get home. |
@randall77, Linux and Mac performance seem to differ significantly even on the same hardware. @jayconrod found significant performance differences in the underlying I/O syscalls in #28739. |
Similar results in my Mac (Darwin 10.12).
Again, this is using |
@glycerine would you mind re-running with flags If you’re up for a git bisect, that’d also be really helpful. If neither of those provide sufficient clarity, next step is probably going to be to get pprof information. |
@randall77 Correct me -- I could be wrong -- but I don't think it suffices to just call the top level @josharian, run below with the flags requested. There still seem to be significant differences in timings with -a. Output was too long for a comment, so posted this gist: https://gist.github.com/glycerine/5bb156bdeea314b215fc2816500bd759 summary:
update: yes, @josharian, I'm up for a git bisect, but I've never run one so you'll have to tell me exactly what to run. |
I don't think this is specific to osx. I can observe similar differences on linux amd64.
update: I do notice that gomacro uses CGO/gcc. |
This is what I get on my linux box -
cached -
1.12beta1
cached -
A difference of a couple of seconds. @glycerine - git bisect is a standard technique to find faulty commits. Nothing specific to Go project. You can find lot of material online. In short, find the commit hash range you want to check (in our case start of 1.12 to end of 1.12), then |
@agnivade would you mind, on your linux box, repeating exactly the procedure I did that showed the difference. Can you reproduce it that way? |
That is what I have done effectively. To do it exactly would mean to nuke my /usr/local/go and have version specific installations under /usr/local/ which I don't want to do. One difference is that you haven't used Also, note that for the first time, the kernel buffer cache will be empty, so it will naturally take more time than consecutive ones. I would just discard the result of the first run to ignore those effects. |
If you're manually setting If you're not setting |
We have a standard way to swap out (recent)
|
@bcmills: Where is this standard documented? I haven't seen this before. |
We've advertised them in every (recent) release announcement. For example, in the Go 1.12beta2 announcement:
|
Need to pay more attention I guess.... |
@robpike that is precisely why I raised this CL last week: https://go-review.googlesource.com/c/go/+/157457 |
I just tried to reproduce on Darwin but didn't find a significant difference. I got quite different timings on first run vs subsequent runs, however. Here's the data I got for compiling a small-to-medium size project below. If I take the worst tip and compare with best go1.11 (pessimal), gotip is 1.5x slower in realtime. More fairly, comparing the medians gives 1.1x slower. But I can't reproduce a 2.8x slower on tip.
edit: Numbers for 1.10.7, since the above comparison was 1.11 vs tip, rather than 1.10 vs tip. It is again slightly faster but not significantly so (1.23x realtime gotip vs 1.10).
|
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
go1.12beta2 is much, much slower than go1.10.7 at compiling, on OSX darwin 10.13.6 amd64.
go1.12beta2 takes 6.7 seconds to do the same build that go1.10.7 does in 2.4 seconds.
specifics:
update: for comparison, here is go1.11.1. Nowhere near the slowness of go1.12beta2.
The text was updated successfully, but these errors were encountered: