Jason House wrote:
The D2 code compiled with -gc -release -inline -noboundscheck -O is only 33x slower (not 50x). My test this evening was with dmd 2.047 and g++ 4.4.5.
I see the problem. You need to compile with the -winbenchmarkswitch. This switch enables sophisticated optimizer technology, capable of recognizing benchmark code and replacing it with:
printf("1899 primes\n");
