I\'m learning about multithreading, but after reading some tutorials I\'m sort of confused. I don\'t understand how multithreading can speed up an application.
By in
Think of threads as "things happening at the same time".
Once you think of them that way, then it doesn't matter if multiple threads are running on a single or multi-core machine. The idea is that you have more than one code path that executes simultaneously.
Now, if we look at a single core machine, then there can only ever be one thread executing at a time as you point out. However, if you think of each thread as a context, there can be several happening: handing input, updating the display, handling network communication, doing background tasks, etc. So yes, on a single core machine, multi-threading will be slower. However, that's not the point. The point is that your application is able to handle multiple activities simulteneously.
Finally, when you do move from a single core machine to one with multiple cores, if you've threaded yur application properly, those contexts have a much better chance of truly running simultaneously.