4 ms·
To both comments - it's not JUST because the lack of threads, don't take an example as the entire extent of the critique. It lacks threads. It lacks SIMD. It la
by c0de517e 12y ago
To both comments - it's not JUST because the lack of threads, don't take an example as the entire extent of the critique. It lacks threads. It lacks SIMD. It lacks control over pointer aliasing (restrict), something that FORTRAN did right decades before C++ and C is doing today but C++ still lacks, and it's quite fundamental to write high performance kernels. It does -NOTHING- of the things that are needed for performance, all these things had to be added by custom compiler extensions because it's a popular language and we have very, very good compilers, but the language standard itself lacks in a lot of ways for HPC
- adamnemecek 12y agoSo what do you consider an HPC language? Fortran?
- c0de517e 12y agoFortan is -undoubtedly- thought as a HPC. That doesn't mean it's great or I would use it today, but yes, without a doubt it is one of such languages. That's not to say that if today I had to write, as I do, a tight CPU kernel, I would not chose C or C++, these have the best compilers and tools and are more general languages. But C++ was never designed to aid stuff like numerical computation, never. It was designed to be zero-overhead on top of C if you didn't use any feature with overhead. That means that it can go all the way down to C performance, and C is considered almost as a portable assembly, so it's quite low-level. Low-level and high performance are not entirely the same thing! In fact you can easily, easily outperform -standard- C++ in many interpreted languages that support vector operations or GPU offloading, for example matlab. If you want a c-like cpu hpc language for tight numerical kernels to integrate with c functions, look for Intel's ISPC