Board index » cppbuilder » Re: Dismaying simple math performance: Answer found
Andrew Ozarowski
![]() CBuilder Developer |
Re: Dismaying simple math performance: Answer found2004-09-14 10:16:25 PM cppbuilder28 I just found the answer to the problem, and it is not pleasant. In Borland C++ 5 you can choose between 'Borland optimizing compiler' and 'Intel optimizing compiler'. When using the former one, I get exactly the same execution time for the simple routine pasted below in executables compiled with either BCB 6 or with Borland C++. However, when using Intel optimizing compiler, the execution is almost two times faster. Both BCB 6 and Borland C++ 5 with Borland compiler produce the same assembler code, but Intel compiler produces different code. Thus, the problem seems to be intrinsic and unsolvable. With the (negative) performance hit this big BCB 6 does not appear to be suitable for scientific calculations with extensive number crunching. I am going to have a look at Microsoft Visual C++. Andrew Summary: Compiled with: Execution time BCB 6 dynamically linked 57 sec disabled RTL and run time packages 81 sec (1'21'' !!!) Borland C++ 5 using Borland compiler 57 sec using Intel compiler 31 sec Quoteint i, n; |