views:

284

answers:

1

hello.

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

+7  A: 

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.

GMan
If anything you'd almost get an instant benefit due to move semantics
Billy ONeal
@Billy: Great point, actually. I'll add.
GMan
well, recompiled C++ sources with C++ 0x g++ and indeed there is no difference, whenever I use regular floating-point or Intel intrinsic. so as far as a performance they seem to be the same. have not looked at the assembly, but my guess is equivalent as well
aaa