I was able to feed stdin to `gcc` instead of all that IO, which considerably sped it up and spread over 5 cores.
But ultimately I gave up after the third time my computer crashed. I was at length 4 by that point, next step would have been to throttle the CPU usage.