rustc-dev-guide icon indicating copy to clipboard operation
rustc-dev-guide copied to clipboard

Clarify why Salsa is mentioned

Open Arthur-Milchior opened this issue 1 year ago • 2 comments

I admit I'm quite confused by the part of the book about Salsa. Not the content, it feels relatively clear after the previous sections explains in details the idea of the algoritm. But why it is mentioned.

First, in incremental compilation, I read

> 1 I have long wanted to rename it to the Salsa algorithm, but it never caught on. -@nikomatsakis

Then I realize in how salsa works that something is called Salsa. So I guess the book should clarify somehow how the algorithm wannabe-name and the library are related. In particular, that the Salsa library is not an implementation of what nikomatsakis calls the Salsa algorithm, even if the talk is by the same person. I admit that it's relatively confusing here.

More importantly, I think, is, why is this section in the rustc-dev-guide if rustc does not use it. The actual implementation was linked to in the "in detail" section. So I guess the point is not to tell us the red-green algorithm is really used. If the point is only to state "by the way, this is a clearly related topic you might be interested", I suspect you should explicitly state that, while interesting, one won't learn anything about rustc specifically in this section

Arthur-Milchior avatar Jan 28 '24 10:01 Arthur-Milchior

Salsa the library is an implementation of the Salsa algorithm. Also, the red-green algorithm (which is another name for the same thing) is used in rustc, it's just not using Salsa the library :slightly_smiling_face:

flodiebold avatar Jan 28 '24 13:01 flodiebold

Oh. Since it is another name for the red-green algorithm, then I guess the footnote is no longer accurate.

Still, I admit that it's not clear why the rustc book mentions a library not used by rustc.

Thanks for the clarification

Arthur-Milchior avatar Jan 28 '24 15:01 Arthur-Milchior