Multithreading, is it a good idea ?

Leave aside the classical buzz words: massively parallel, multi-core multiprocessor and state of the art optimization for N-core… It has a cost, and represents efforts no matter what.

What will you lose going Multithreaded ?

Some things are nice, beautiful and enjoying because they are simple. By "multithreading" code, you might deface it, make it much more complex and much more unstable than it needed to be.

I would recommend the KISS aproach: Keep-It-Simple-Stupid.

Do I have a need for parallelized computation ?

No, not everything needs parallelized computation. Not every part of code is "time critical" and not everything needs to "run as fast as possible".

So, ask yourself: Does it fit to the actual problem? Can you think of your computation as a big job that you could split easily ?

Good: a ray tracer, you have a set of rays, and you can make subsets of rays and attach the subsets to core/processors/peers
Bad: making accounting balance, you just need it to be correct in a descent time, not especially to be fast for the sake of it

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License