Why is my multi-threading slower than my single threading?

Note that Process writes to the console (and basically does nothing else), and that output to the console (which here acts as a kind of shared resource) is slow and needs to be synchronized with the other threads.

To my understanding, the parallelization you use creates a huge overhead but gains no speedup, because all of the time the threads are apparently mostly waiting for the other process to finish writing to the console.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)