Closed brson closed 8 years ago
cc me
Certainly specialization seems like a likely candidate. I wonder if some simple hashing using simplified types could help here? Have to go review what the code does.
At the moment, specialization does essentially no caching, relying instead on selection caching. However, I believe that the coherence part of specialization (where the graph is built) is not able to use this cache as currently written. There are lots of easy opportunities to do better, if this is indeed the culprit.
I confirmed that this is due to specialization. I think, in particular, it's stemming from the move away from using simplified types.
Amusingly, the initial version of the code I wrote for the specialization graph actually did keep the simplified type distinction, but I dropped it because I doubted it was worthwhile here. Looks like I was wrong! I'll work to get a patch together in the next couple of days.
Coherence checking from winapi went from negligible time to 126 seconds.
From @retep998 on IRC.
I can't offer further information now. cc @rust-lang/lang.