In this lesson, you’ll see how functional programing makes parallel processing simple. If you can write your program in such a way that it uses a map
operation to transform some input data into some output data, then it’s quite simple to parallelize it.
You just need to import concurrent.futures
and add two lines of code instead of a straight-up map()
call, and your code is running in parallel! This can lead to huge improvements in speed.
Pygator on Jan. 20, 2020
This is good and all for speeding up the code by parallelizing it. But i’m still so confused about the difference betweeen, “threads”, “pools”, “processes”, and “cpu cores” .