Thanks! Looking forward to this next iteration. Just a few final notes:
-
Regarding “-O2” vs. “-O3”. In most cases the performance difference is very small and either of these options may be slightly faster. But -O3 is generally a better choice on average. And in some cases -O3 produces significantly faster code (when autovectorization kicks in or when more aggressive unrolling/inlining pays off). The users of the C++ language can freely override the compiler command line settings via GCC pragmas and get access to “-O3”. There’s unfortunately no way to do something like this with GDC 6.3 and that’s why having optimal command line options does matter a lot. If you have reliability concerns, then Google Kick Start already uses -O3 for their GDC compiler without any problems since a very long time ago.
-
Regarding “-frelease”. This option is also very important for optimal performance, primarily because it disables arrays bounds checking. Bounds checking can be rather expensive when arrays indexing is done a lot in a submitted solution. The difference between C++ and D languages on this matter:
- When using C++, we have performance by default and safety checks can be optionally enabled via “-fsanitize=undefined -fsanitize=address”.
- When using D, we have safety checks by default and performance can be optionally enabled via “-frelease”.
-
Regarding the latest version of the GDC compiler (GDC 11.2.0). If you happen to consider using it on your platform after the next compilers upgrade, then one more command line option would be necessary to avoid a performance disaster. The exact details are here. GDC versions up to and including 10 are fine. And a modern LLVM based LDC compiler is a great alternative too.
I’m ready to answer any questions and help with testing.