Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AndrewC
New Contributor I
37 Views

Visual Studio 2015 Update 3 C++ compiler vs Intel 16.0

The Visual Studio Compiler  team have introduced new optimization capabilities in VS 2015 Update 3 see (https://blogs.msdn.microsoft.com/vcblog/2016/05/04/new-code-optimizer/)  and I have to say it seems to be working very well and generates significantly faster code than Intel Compiler 16.0 in , at least , in some examples I am testing.

For example, I have a simple "binary search" algorithm I am using to search a array of doubles. The VS 2015 Update 3 microsoft compiled code completes in my benchmark in 2.44ms, whereas the Intel Compiler took 6.82ms. Nearly a factor of 3.

I checked using the Visual Studio 2013 compiler, and it generated  code that performed similar to the Intel Compiler, so it's clear that the VS 2015 Update 3  has really 'moved on' with some good optimizations.

I think the MS Compiler team have really 'thrown down the gauntlet'  here.

 

 

0 Kudos
4 Replies
TimP
Black Belt
37 Views

The msvc update made particularly large improvements in vectorization for the sse2 default target isa . It doesn't require anti-aliasing options like pragma omp simd or __restrict as icl does, it apparently performs run time aliasing checks. There are still several categories of vector optimization which msvc misses.

You may need to identify where your application spends time, possibly even setting pragmas to cause ICL to optimize for the important loop counts.  As others suggested, Intel VTune and Advisor are meant for this purpose.  Another option is the profile feedback.

JenniferJ
Moderator
37 Views

it would be bug if it's the case. what are the flags used for cl and icl? would it be possible to share your code? or file a ticket at Intel Premier Support?

thanks,

Jennifer

Markus_W_Intel1
Employee
37 Views

To follow up on this thread, have you filed a ticket at Intel Premier Support? If not, can you send us your testcase or code snippet so that we may try and duplicate the issue?

Best Regards,

Markus                                                                                                                                                     

 

AndrewC
New Contributor I
37 Views

Not trying to start a "compiler war" here.  I am trying to point out that after years of neglecting their C++ compiler, the MS Visual C++ team are being quite agressive in new C++ features and optimizations and it appears that their Visual Studio 2015 Update 3 has some good work.

This is an example.


int test(int a) {
    return a % 2 != 0 ? 4 : 2;
}

The assembly generated by ICC for this function has many more instructions that the assembly( below) generated by the Visual Studio 2015 Update 3 Compiler.

    and    ecx, 1
    lea    eax, DWORD PTR [rcx*2+2]

A "silly" example, but I am seeing improved performance in many of my functions.