Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C++0x optimizing compiler quality

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 produce 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++.

like image 612
Anycorn Avatar asked Apr 20 '10 23:04

Anycorn


1 Answers

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.

like image 145
GManNickG Avatar answered Sep 23 '22 08:09

GManNickG