4 ms·
gold is multi-threaded but its implementation didn't scale well for multicore, so in many cases, multi-threading simply disabled. Internally, gold is organized
by rui314 5y ago
gold is multi-threaded but its implementation didn't scale well for multicore, so in many cases, multi-threading simply disabled.
Internally, gold is organized as a collection of "tasks". For example, there are tasks to read symbol tables and tasks to parse symbol tables. They form a dependency graph, and the gold's scheduler reduces the graph by executing them, possibly in parallel. It's essentially the same as what the make command does. It didn't scale well for some reason, though.
For more details, read https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/34417.pdf https://static.googleusercontent.com/media/research.google.c...
mold employs data paralellism instead of task-based paralellism. As I described in the doc, we use simple parallel-for loops. It looks like it scales pretty well.