As soon as the best answers begin, it depends on what you are trying to do, and in this case it depends on what you are trying to do (at the hardware level).
There are currently some good machines available with 32 + cpus on them. To use all of these cpus requires either:
- You are writing a multithreaded program in your chosen language.
- You write one single-threaded program and run many instances that all exchange in some way (to share the workload) to solve your problem.
Often 1 is much easier to do than 2.
If you look at the “future of equipment”, it seems that there is a tendency toward faster rather than faster. So to say, ParaCCC (imaginary language) is 10 times slower than C, but you have a machine with 512 processors on it that ParaCCC can use (for our problem). In theory, the ParaCCC program will run 51 times faster than the C program. Without rewriting. Plus C, as a rule, does not know its time to market, where, since this is another boast of these new languages.
Also, you probably don't think that most programs that do any amount of I / O end up being multi-threaded, since you tend to use different threads for I / O than processing, and you don't want one slow the client slows you down (obviously C can do this, but a multi-threaded model usually looks a lot nicer).
As for Erlang, I asked the following question here: How many processors are needed before Erlang is faster than single-threaded Java , the answers to which have much more details and arguments in this direction ...
Davec
source share