Calculating speedup of this parallel program I have a sequential program that has a cost of
$(\sum_{n=1}^{N} Ti )$  Where Ti is the load time of the i-th element, so if consider $Tm = max({Ti}) $ i can approximate the sequential cost as $N*Tm$ that has a linear cost.
Let's suppose that i have c cores and i decide to parallelize this program, i can divide the loading of these items among c cores so i have (At most)
$(\sum_{n=1}^{N/C} Ti ) \leq Tm \cdot N/C$
So in brief:
Sequential (approx.) cost: $N*Tm$
Parallel(approx.) cost: $[N/c]*Tm$
How can i calculate the speedup? what about the efficiency?
Thank you.
Kind of application you mention seems to be I/O bound i.e., application execution time is dominated by I/O time (Ti). In this case using multiple threads is not going to be advantageous as there is only one connection between your I/O device (permanent storage) and CPU (having multiple cores). That one connection is the bottleneck. You will not observe much of a speed-up as you increase the number of threads. There may be slight gain as number of threads increase initially, as threads try to saturate and use the maximum bandwidth possible for the I/O connection. Gain will also depend on how much time is spend on I/O and how much on processing of read data. Both of them can run in parallel for two different threads. But your question seems to suggest that I/O time (to get data) &gt;&gt; compute time (to process data). Hence there will be limited gain by increasing the number of threads. Instead, try to optimize the I/O. Keep it sequential and read in larger blocks.