How many CPU cores can you actually use in parallel?
When you’re running a CPU-intensive parallel program, you often want to have a thread or process pool sized by the number of CPU cores on your machine. Fewer threads and you’re not taking advantage of all the cores, more than that and your program will start running slower as multiple threads compete for the same core. Or that’s the theory, anyway. So how do you check how many cores your computer has? And is this actually good advice? It turns […]
Read more