Better multithreading in compilation