15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Floating-Point optimization

Magnus_Johannesson/GBG/FRONTEC.FRONTEC@notes.frontec.se
Friday, December 06, 1996


Environment: Windows 3.11, VC++ 1.52

I'm working on a floating-point intensive application. Which compiler option(s) 
should be set to maximize (speed) performance?

Magnus Johannesson
Frontec Konsulter





Jerry Coffin -- jcoffin@taeus.com
Wednesday, December 11, 1996

At 03:15 PM 12/6/96, you wrote:
>
>Environment: Windows 3.11, VC++ 1.52
>
>I'm working on a floating-point intensive application. Which compiler
option(s) 
>should be set to maximize (speed) performance?

-G3 -Ozxb2 

works quite well for me.  -Oz is documented as including "dangerous"
optimizations that can break certain working code.  However, it can make
enough difference in speed to be worth trying anyway.

One other thing worth trying -Gr which tells the compiler to use the
_fastcall calling convention.  It's my experience that to get the most out
of _fastcall, you need to specify it for particular functions rather than
using the compiler directive.  _fastcall improves some functions but hurts
others, but using the compiler directive turns it on for all functions,
whether they'll benefit from it or not.






| Вернуться в корень Архива |