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: registerization of large functions worse than in Go 1.2 #8214
Labels
Milestone
Comments
This is caused by primarily by the introduction of temporaries in any +=, ^=, and so on. The larger number of variables hits a limit in the compiler that stops registerization earlier. That's why combining addition helped. It may also help to say x = x + y instead of x += y (I'm not 100% sure about that). This is certainly unfortunate for 1.3 but it only affects very large functions. Even with more registerization (by increasing 6g/opt.h's NGRN) it's not as fast as 1.2. As far as I can tell the compiler was ending up with better register choices in 1.2 almost by blind luck. Labels changed: added release-go1.4. Status changed to Accepted. |
rsc
changed the title
cmd/gc: registerization of large functions worse than in Go 1.2
cmd/compile: registerization of large functions worse than in Go 1.2
Jun 8, 2015
I believe this is fixed in Go 1.7:
(Go 1.6.3 vs Go 1.7 on MacBook Pro 2.6 GHz Intel Core i5) |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: