Idea: polymorphic baseline codegen

As a historical note, we used to have such an implementation. It was horrifically complicated. I think that it might be better now, as we have MIR and other things that let us be a bit more careful — otoh, we also have a lot of features that rely on monomorphization (some have come up in this thread, I don't have a full list in my head).

I would be interested here but to my mind, this is not "low hanging fruit" when it comes to improving compile speed. I feel like MIR optimizations are more likely in that regard, as well as projects like CraneLift (nee Cretonne) (see e.g. this previous thread).

3 Likes