Re:Mid-stack inlining in the Go compiler
by micah_chatt on Monday March 06, 2017 @12:02PM
(#13804003)
What impact would that have on build times? I know a lot of work has gone into getting back to 1.4 build times, but would the added work of inlining prolong builds?
[ Parent
| on HN ]
The compiler got a bit slower:
https://github.com/golang/go/issues/19386
Those numbers are just for my CLs that fix stack traces but with mid-stack inlining still off. Turning it on makes builds noticeably slower:
$ time ./make.bash
real: 45.32s user: 118.67s cpu: 5.85s
$ time GO_GCFLAGS='-l=4' ./make.bash
real: 64.51s user: 167.04s cpu: 7.12s
We'll need to tweak the inlining heuristic to find a good balance between performance, build times, and binary size.But then the compiler gets faster once you compile it with these new improvements. Is that accounted for in the issue?
Please have a switch where I can sacrifice build time for maximum possible runtime benefits.
Re:Mid-stack inlining in the Go compiler
by chriswarbo on Monday March 06, 2017 @05:24PM
(#13806620)
The compile-time/run-time tradeoff is interesting. Getting the "maximum possible runtime benefits" probably calls for https://en.wikipedia.org/wiki/Superoptimization :)