开发者

C++0x optimizing compiler quality

开发者 https://www.devze.com 2022-12-27 19:28 出处:网络
I do some heavy numbercrunching and for me floating-point performance is very important. I like performance of Intel compiler very much and quite content with quality of assembly it produces.

I do some heavy numbercrunching and for me floating-point performance is very important. I like performance of Intel compiler very much and quite content with quality of assembly it produces.

I am thinking at some point to try C++0x mainly for sugar parts, like auto, initializer list, etc, but also lambdas. at this point I use those features in regular C++ by the means of boost.

How good of assembly code do compilers C++0x generate? specifically Intel and gcc compilers. Do they pro开发者_StackOverflow社区duce SSE code? is performance comparable to C++? are there any benchmarks?

My Google search did not reveal much.

Thank you.

ps: at some point am going to test it myself but would like to know what to expect relative to C++.


You can expect the same optimization for your code, because the compiler certainly didn't get worse at optimizing. So only using the new C++0x features might impact it. But I doubt your core routines would suddenly be completely changed to somehow use C++0x-only features.

Keep in mind things like auto and lambda are just syntactic sugar. That will have no effect on compiler optimization because they're just methods of generating the same code you would anyway. So you'd only need to worry about the new "stuff" like initializer lists. But I'd be surprised if that was inefficient as well.

You should also expect many improvements, because of move-semantics. No longer must you copy data around but merely move it around. Design your code to take advantage of this for most benefit.

0

精彩评论

暂无评论...
验证码 换一张
取 消