Open TeofilC opened 3 weeks ago
There is unfortunately not much we can do to actually do the hard work in parallel, iirc. I don't know how to do a parallel reachability traversal.
I've dabbled with things like this before, so I might give it a go (when I have some time). After a quick look, I think I've spotted some other low-hanging performance fruit as well
I look forward to seeing what you come up with!
I suppose the reachability traversal could be done more in parallel by searching graphs of individual modules first, taking exported declarations as roots. Then the final single-threaded search becomes a matter of searching through a graph of exports only, rather than all declarations. This may get more complicated in the presence of type class instances, though.
I've noticed that when passing
-j8
to weeder, it often still uses only one core. See this graph from threadscope