Professional Documents
Culture Documents
Speedup and Efficiency
Speedup and Efficiency
Parallel Systems
12-9-2023
The Demand for Computational Speedup
Sequentially: You pick up each apple one by one and count it. This takes
some time, let's say 100 seconds.
In Parallel: You have four friends, and each of you grabs a part of the
apples. You all count your apples simultaneously. This way, it takes only 25
seconds for all of you to count your respective apples.
Now, let's calculate the "speedup factor," which tells us how much faster
the parallel method is compared to the sequential method.
In our example, the speedup factor would be: 100 seconds (sequential) /
25 seconds (parallel) = 4
Real World Example
(In Series)
import time
import multiprocessing
end_time = time.time()
return total_count, end_time - start_time
Efficiency
11