

This is quite wasteful because it will use 64-bit absolute addresses rather than 32-bit relative addresses for static variables and constants. The Cygwin64 version of Clang is using a medium memory model by default. The Cygwin version of Clang has been around for several years, but it is not fully up to date and it has some performance problems.

A Cygwin version and a Visual Studio plugin version. There are at least two ready-to-use Clang compiler versions for Windows. It is a little more complicated on Windows. Linux and Mac programmers will have no problems finding a Clang compiler. I must admit that I was quite skeptical of the LLVM/Clang project when it started, but people have put an impressive amount of work into it, and now the Clang compiler can outperform all other compilers on several measures. Clang is better than Gcc in several respects, but it has a tendency for excessive loop unrolling, which is a waste of code cache. The Gcc and Clang compilers are clearly the best when it comes to code optimization.

I have tested the different C++ compilers and listed the results in my C++ manual. Both are supporting all platforms and the newest instruction set extensions. The open source compilers Gcc and Clang have now taken the lead. Intel's compiler has also lost in popularity since its hidden "Cripple AMD" function was revealed.

The Intel compiler used to be on the cutting edge of code optimization, but now it has been overtaken by Gcc and Clang. But Visual Studio is lagging behind on support for the latest instruction sets, and it is not the best compiler when it comes to code optimization. Microsoft Visual Studio is very popular because of the user friendly IDE and excellent debugging and cross-reference features. Compiler making has become more complicated with new advanced C++ standards (C++17, C++20), new instruction set extensions such as AVX512 with hundreds of new instructions, and higher standards for code optimization. Several of the less known compilers have gone out of the market, and even the once so popular Borland (Embarcadero) C++ compiler is now no longer maintained. The number of C++ compilers on the market has gone down in recent years. Agner`s CPU blog - Best C++ compiler for Windows Agner`s CPU blogīest C++ compiler for Windows - Forsen.
