Struan wrote:
Yes, C# (or something similar) will replace C++.
C++ is not going to be the most powerful language for long. Like when 32+ core cpus come out in the next 1 or 2 years. C++ has far too much legacy functionality to make significant improvements in this space. Manually writing efficient threaded code for 32+ cores in C++ will not be practical or really even possible.
"Coming out" and "becoming a standard" are two
completely different things. Correct me if I'm wrong, but I believe theres already quite a few 16+ core CPUs out there. If not, at least 8+. I wouldn't be surprised if it is a long time before we see people putting 16-core CPUs into their computers unless both of the following are true:
- The clock rate per CPU is not drastically reduced in comparison to CPUs of equal price with 2 or 4 cores (~3.0 GHz)
- The price of the 16-core CPUs is not significantly higher than those of 2 or 4 cores.
Such high-end computers are often used for either games or servers. Now for servers, thats an easy one - servers, in my opinion, are one of the easier things to have take advantage of multiple cores, especially web servers, since it is often part of the design to break connections into groups. Web servers, each connection is individual from one another and has its own processing. Very easy multithreading there. For games, with map "sharding" or instancing, you again get very easy and distinguished groups. And then, the OS can go and take the multithreading even farther for you on the sockets (IOCP).
Now for games, most CPU time goes to what? Rendering and physics? Those both can be very hard things to multithread in comparison to the above. Even then, if DirectX and OpenGL are redesigned to support utilizing like 16 cores, only games designed for it can take advantage of it, so its not going to help any games currently out. Which means we have to wait for the support to be made for it, people to create games with it, then for those games to be released. Once enough of those games are released, THEN lots of cores may catch on.
Until then, games are just now utilizing 2 cores, and on rare occasions with high quality games, 4 cores.
Anyways, that gives C++ libraries plenty of time to be developed to support multiple cores, too.
