Finding large difference b/w execution time of c++ and D codes for same problem
FG
home at fgda.pl
Wed Feb 13 07:17:12 PST 2013
Good point about choosing the right type of floating point numbers.
Conclusion: when there's enough space, always pick double over float.
Tested with GDC in win64. floats: 16.0s / doubles: 14.1s / reals: 11.2s.
I thought to myself: cool, I almost beat the 13.4s I got with C++, until I
changed the C++ code to also use doubles and... got a massive speedup: 7.1s!
More information about the Digitalmars-d-learn
mailing list