<p>Is here any performance benefit to using multiple threads on a computer with a single CPU that does not having hyperthreading?  </p>

[{'answer_id': 47705, 'author': 'MontyGomery', 'author_id': 4930, 'author_profile': 'https://Stackoverflow.com/users/4930', 'pm_score': 6, 'selected': True, 'text': '<p>In terms of speed of computation, No.  In fact things will slow down due to the overhead of managing the threads.</p>\n\n<p>In terms of responsiveness, yes.  You can for example have one thread wait on an IO operation and have another run a GUI at the same time.</p>\n'}, {'answer_id': 47830, 'author': 'McKenzieG1', 'author_id': 3776, 'author_profile': 'https://Stackoverflow.com/users/3776', 'pm_score': 1, 'selected': False, 'text': '<p>Regardless of the number of CPUs available, if you require preemptive multitasking and/or applications with asynchronous components (i.e. pretty much anything that combines a responsive GUI with a non-trivial amount of computation or continuous I/O processing), multithreading performs much better than the alternative, which is to use multiple processes for each application.</p>\n\n<p>This is because threads in the same process can exchange data much more efficiently than can multiple processes, because they share the same memory context.</p>\n\n<p>See <a href="http://en.wikipedia.org/wiki/Computer_multitasking" rel="nofollow noreferrer">this Wikipedia article on computer multitasking</a> for a fairly concise discussion of these issues.</p>\n'}, {'answer_id': 67006, 'author': 'Bill Michell', 'author_id': 7938, 'author_profile': 'https://Stackoverflow.com/users/7938', 'pm_score': 4, 'selected': False, 'text': "<p>It depends on your application. If it spends all its time using the CPU, then multithreading will just slow things down - though you may be able to use it to be more responsive to the user and thus give the <em>impression</em> of better performance.</p>\n\n<p>However, if your code is limited by other things, for example using the file system, the network, or any other resource, then multithreading can help, since it allows your application to behave asynchronously. So while one thread is waiting for a file to load from disk, another can be querying a remote webserver and another redrawing the GUI, while another is doing various calculations.</p>\n\n<p>Working with multiple threads can also simplify your business logic, since you don't have to pay so much attention to how various independent tasks need to interleave. If the operating system's scheduling logic is better than yours, then you may indeed see improved performance.</p>\n"}, {'answer_id': 77232, 'author': 'MarkR', 'author_id': 13724, 'author_profile': 'https://Stackoverflow.com/users/13724', 'pm_score': 2, 'selected': False, 'text': "<p>Yes, there is a benefit of using multiple threads (or processes) on a single CPU - if one thread is busy waiting for something, others can continue doing useful work.</p>\n\n<p>However this can be offset by the overhead of task switching. You'll have to benchmark and/or profile <em>your</em> application on production grade hardware to find out.</p>\n"}, {'answer_id': 86091, 'author': 'Benoit', 'author_id': 10703, 'author_profile': 'https://Stackoverflow.com/users/10703', 'pm_score': 1, 'selected': False, 'text': '<p>Absolutely! If you do any kind of I/O, there is great advantage to having a multithreaded system.  While one thread wait for an I/O operation (which are relatively slow), another thread can do useful work.</p>\n'}, {'answer_id': 11046851, 'author': 'Sergii Shevchyk', 'author_id': 946224, 'author_profile': 'https://Stackoverflow.com/users/946224', 'pm_score': 3, 'selected': False, 'text': '<p><strong>You can consider using multithreading on a single CPU</strong></p>\n\n<ol>\n<li>If you use network resources</li>\n<li>If you do high-intensive IO operations</li>\n<li>If you pull data from a database</li>\n<li>If you exploit other stuff with possible delays</li>\n<li>If you  want to make your app with ultraspeed reaction</li>\n</ol>\n\n<p><strong>When you should not use multithreading on a single CPU</strong></p>\n\n<ol>\n<li>High-intensive operations which do almost 100% CPU usage</li>\n<li>If you are not sure how to use threads and synchronization</li>\n<li>If your application cannot be divided into several parallel processes</li>\n</ol>\n'}]
['https://Stackoverflow.com/questions/47703', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4883/']