CPUs - why do we have more than one
1. CPUs - why do we have more than one?
2. CPUs
The CPU is the brains of the computer. The faster the CPU, the faster your code will run. For the last decade or so, the speed of a single CPU has slowly stabilized. The reason is that as they got faster, they become hotter. So hot in fact, it's a problem keeping them cool. So computer manufacturers moved from making very fast single core machines, to multi-core machines. Unfortunately R is single threaded. This means that by default it will only use a single core. But by using the parallel package you can make sections of your code use all available cores.3. Your CPU
Before you go running into the world of parallel computing, let's investigate your hardware. The detect cores function in the parallel package returns the number of cores on the machine. In this case, eight. The benchmarkme package extends this function via get_cpu. So my machine has an intel i7 chip with eight cores. As you'll see, this gives the potential for an eight fold speed-up.4. Let's practice!
Now your turn.Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.