How to: Inline assembler in C++ (under Visual Studio 2010)

后端 未结 6 1771
孤独总比滥情好
孤独总比滥情好 2020-12-30 15:25

I\'m writing a performance-critical, number-crunching C++ project where 70% of the time is used by the 200 line core module.

I\'d like to optimize the core using inl

6条回答
  •  感动是毒
    2020-12-30 16:29

    Go for the low hanging fruit first...

    As other have said, the Microsoft compiler is pretty poor at optimisation. You may be able to save yourself a lot of effort just by investing in a decent compiler, such as Intel's ICC, and re-compiling the code "as is". You can get a 30 day free evaluation license from Intel and try it out.

    Also, if you have the option to build a 64-bit executable, then running in 64-bit mode can yield a 30% performance improvement, due to the x2 increase in number of available registers.

提交回复
热议问题