Finding large difference b/w execution time of c++ and D codes for same problem
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Wed Feb 13 07:41:19 PST 2013
On 02/13/2013 04:17 PM, FG wrote:
> 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!
Yea, ditto for C++: 5.3 sec with double, 9.3 with float (using g++ -O3).
More information about the Digitalmars-d-learn
mailing list