Re:O(N^2) in CreateProcess
by BubRoss on Monday April 22, 2019 @02:27PM
(#19721374)
Sounds like it might work much better to only have as many processes as there are logical cores.
[ Parent
| on HN ]
Most build processes are going to run at least the compiler once per code file. Plus or minus a linker and preprocessor and whatever else. Nobody said all 70,000 quoted processes were run simultaneously.
You could presumably write a compiler that didn't do the traditional start - read - process - output - quit cycle to avoid paying startup costs, but it is generally assumed that startup cost is small relative to processing, and that avoiding complexity is worth the cost; if your OS makes startup really expensive, maybe that's not a reasonable assumption.
Re:O(N^2) in CreateProcess
by brucedawson on Monday April 22, 2019 @08:49PM
(#19724616)
We avoid having more processes that cores running at a time. But we run a separate compiler instance for each file we compile, 'cause why not? So, 70,000 processes over the length of the build.