Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
I have developed a code under c++ for some engineering calculations in fluid mechanics. I transfered the code in Fortran 77 and benchmark the speed of 2 executables. The unexpected result: Fortan exe goes up to 4 times faster that c++!!! It was a big surprice for me, but i take a look in the web and i found some guys states that Fortan speeds better than c++.
The c++ (console application) compiled under Microsoft and Borland compilers (the results is almost the same) with all speed optimazations available from each one compiler. Program runs under Pentium 4. Also i must say that program uses about 30 MB of memory for arrays (dynamic allocated). All calculations are performed with double precision. c++ programm is using a class where all the action takes place. I tyied and c style, without a class usage, but the result is the same.
Can any one explain me what's going one?