> Thanks. If there is not already, maybe create an bug with all these ideas to
> track ?
Most of these have tracking bugs. For ease of future reference, I'll
list them below.
Oh, and I remembered one more old idea, which I am still intrigued by,
but which Russ isn't keen on (and he's usually right about most
things). Here it is, for the curious:
https://github.com/golang/go/issues/15734. The discussion there also
contains some interesting links about cmd/go's scheduling, which might
also hold some promise.
>> > "convert the syntax package's AST to its own representation"
>>
>> This is probably the biggest individual win available. It's a *lot* of
>> work, though. I don't know that anyone is actively tackling it.
https://github.com/golang/go/issues/17728
Also, Robert wrote:
> That is, I don't see this as a piece-wise operation, and I also don't see that this is the kind of work that should be done outside the Go Team or somebody who is not full time on the compiler team.
I agree that the final, wholesale replacement will definitely need
that level of attention. However, FWIW, some amount can still be
chipped away at. The most obvious is migrating optimizations and
lowerings from walk to SSA construction, and perhaps even adding
higher level SSA ops, to make SSA construction simpler. (As an aside,
higher level SSA ops could also theoretically improve compiler
performance a little. The high water mark of number of SSA Values
determines the cost of many later passes, and that high water mark is
frequently at initial construction. If we could use higher level SSA
ops initially, do phi elim and copy elim, and then expand those higher
level SSA ops, we might get a performance boost as well as a
comprehensibility improvement.)
>> Other high-level-ish things that come to mind as significant, in no
>> particular order:
>>
>> * Monitor compiler performance. Some of us do this occasionally,
>> manually. A dashboard would be nice. This helps prevent both big
>> regressions and long slow slides, and keeps it in the minds of the
>> compiler contributors. (We already have pretty good attentiveness
>> around this, happily.)
No tracking bug. I don't plan to file one.
>> * Keep grinding away at the details. There has been a lot of this
>> done, so there's not much low hanging fruit, but little improvements
>> do add up. (Also, poring over the compiler and runtime is a fruitful
>> source of compiler optimizations.)
No tracking bug; it wouldn't be actionable anyway.
>> * Improve our inlining decisions. Inlining is quite expensive from a
>> compilation time perspective, and we don't necessarily spend that
>> budget well right now.
https://github.com/golang/go/issues/17566
>> * Make regalloc's liveness analysis non-quadratic. (This is hard.)
Filed
https://github.com/golang/go/issues/25120.
>> * File issues for (and fix!) cases in which the compiler is
>> inordinately slow, even if they seem unusual. (GitHub label:
>> ToolSpeed.) In many cases, compilation time is dominated by its
>> slowest component, and identifying and fixing asymptotic problems can
>> help broadly.
GitHub label: ToolSpeed
>> * Provide some education around how to write generated code in a way
>> that is compiler-friendly. I've been meaning to write a blog post
>> about this for ages...
No tracking bug. I'll do it eventually, if no one beats me to it.
-josh