Intel C++ compiler is dead slow

Intel C++ compiler is dead slow

One of the projects that builds in 10 minutes with VC++ takes 1 hour 43 minutes to build when compiled with Intel's compiler. The machine is a 3GHz P4, dual CPU, 3GB RAM, Win2K3 Server (64-bit). Is this something that is being looked at?

20 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Unless you can give more information, I will assume that you didn't set equvalent options in the two compilers. ICL /O1 /fp:precise may be the closest equivalent to the default options of MSVC; a reasonable set of options for quick development turnaround. Quite a bit of attention has been paid to compilation speed, but there is no way one compiler can vectorize aggressively without taking several times as long as another with no vectorization. But. I could be totally off base, since my ability to guess what you are doing is limited. So is the ability of the compiler team, if you don't submit the problem report on your premier.intel.com account.

tim18:Unless you can give more information, I will assume that you didn't set equvalent options in the two compilers.

Not sure why you would assume that, as it would make very little sense to compare different build options.

tim18:ICL /O1 /fp:precise may be the closest equivalent to the default options of MSVC; a reasonable set of options for quick development turnaround.

Here are some numbers. In all cases the project was individually rebuilt every time. All other options are the same.

                ICL       VC
/Od 55 sec 17 sec
/O1 3 min 42 sec 26 sec
/O2 3 min 47 sec 28 sec
/O3 3 min 49 sec N/A
/Ox 3 min 47 sec 28 sec

tim18:But. I could be totally off base, since my ability to guess what you are doing is limited. So is the ability of the compiler team, if you don't submit the problem report on your premier.intel.com account.

There's nothing to guess about. Any project you build will exhibit this behavior. I appreciate the hard work that went into the compiler - the output is fast, but having to wait for 3.5 hours for a build makes it difficult to use ICL with large projects.

I would appreciate if somebody from the ICL team could comment on this.

Jennifer J. (Intel)'s picture

It might be related to the license. are you using counted license? or please check the license directory [common files]intellicenses, move all the old license files to a subfolder.

It's an evaluation license. Are you saying that the evaluation license is designed to slow the compiler down?

Dale Schouten (Intel)'s picture

Yes, if you could provide a test case it would be most helpful. The preferred method is to submit an issue at premier.intel.com (especially if you don't want to publicly post your code) otherwise you could post here and I'll take a look at it. If you submit an issue at premier.intel.com, I could look into it if you post the issue number here.

Dale

I must be missing something. I have tried compiling several projects on different hardware and it always takes ICL a few times longer than VC to make a build. Can you enable build timing in VS8 (Tools > Options > Projects and Solutions > VC++ Project Settings > Build Timing) and time building any of your projects (preferably those using templates)? Do you not see the same difference?

Andre

Jennifer J. (Intel)'s picture

I do have some samples program. The compile-time difference is not as big as yours. So my guess is that it might be the code, or the pch is re-generated for every file.

Can you get the compile option (from project property) and compile the file that takes most icl time in a command window (you can get a command window from start->all programs->Intel software development tool->Intel C++ Compiler->build environment for IA32)? If you could submit an issue report with this file that shows significant compile-time difference, it would be great.

Even with eval, you can get free support at PremierSupport https://premier.intel.com/.

Thanks.

Community Admin's picture

my 0.02$:

I entirely concur with the original poster. Although the compile-time is measured in tenths of seconds in my case, icl is _way_ slower than VC++ (10.0.27 vs. 8 SP1, fastest options in both cases). But hey, the code is more than 2X faster, so I dont complain!

I reckon the difference is easily 5 or 10X. The real killer for me are LUTs, especially large ones. VC does struggle with them, but icl completely chokes on them. It's really really bad.

For pieces of code without LUTs, icl still takes more time, but given the advanced analysis it performs, and the speed achieved, the difference is understandable. My code is rather small, it helps as well :)

Jennifer J. (Intel)'s picture

is it possible to attach your test or program here? Or could you file an issue report at Premier Support https://premier.intel.com/ with your program? It would be a great help to improve the compile-time (and still keep the binary performance).

Thanks!

Jennifer,

I ran VC and ICL from the command line, as you requested. Here are the options:

/O2 /Ob1 /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "_USRDLL" /D "_CRT_SECURE_NO_WARNINGS" /D "_CRT_NON_CONFORMING_SWPRINTFS" /D "_WINDLL" /D "_ATL_DLL" /D "_UNICODE" /D "UNICODE" /GF /FD /EHa /MD /Gy /Fo"Release" /Fd"Releasevc80.pdb" /W3 /nologo /c /Wp64 /Zi /TP /Y-

I did a couple of dry runs for each compiler before taking measurements. Here are the results:

VC : 11 seconds
ICL: 71 seconds

I cannot create a case at premier.intel.com - my account gets rejected with no particular explanation, just that it cannot be used to login there.

If you want code sample, you can download the source at the following location:

http://www.stonesteps.ca/downloads

You will need to download v3 of Stone Steps Webalizer. Note that this code has some dependencies, so you won't be able to compile it without resolving these dependencies first.

The current project is for VC6. I will post in a few days a VC8-compatible project. It should give you for now the idea of how the code looks like.

Also, the .dsp file is saved with just LF's, which throws off VS IDE. You will need to open webalizer.dsp file in a text editor and re-save with CRLF line endings.

Jennifer J. (Intel)'s picture

First of all, thanks for the source.

I couldn't compile though. Two issues. the .dsp file seems corrupted. If I try to compile from command line, many .h files can not be found, such as "zlib.h", "db.h".

I downloaded the webalizer_src_3_0_4_1.zip. Is it the right one to use?

Thanks for looking into this. Yes, that's the correct file. I also described in my post how to fix webalizer.dsp. As for dependencies, let me work on a package that would make it easier for you to make a build. It will probably take me a couple of days.

I think there's a tradeoff in there that you have to accept. I have noticed that ICC is slower at compiling than GCC, but while it takes 2-3x longer to compile the code, the code ends up running 4-7x faster. That is a tradeoff I can live with, especially since you compile once, and run many, many times.

You're the first in this thread to bring up gcc or to switch the subject to linux. My first comment applies there. Default optimization level in gcc is -O0, which of course permits faster compilation. In order to compare performance of gcc with icc, you must set equivalent options, such as
gcc -O3 -funroll-loops -ftree-vectorize -std=c99
vs
icc -ansi_alias -fp-model precise
where you will usually see icc compiling much faster than gcc.

Jennifer,

I made a VS8 project, which is available at the same location:

http://www.stonesteps.ca/downloads/

In addition to the source, you will need to download the package containing dependencies, which is available at the same domain, but you will need to type this path in the URL box:

/downloads/pickup/common-db-gd-zlib.zip

This file contains all headers and all libraries you need to compile under VS8. In order for this build to work, you will need to make sure you have this directory structure:

.../
+-/common
+-/webalizer-3-0-5-1

The solution file is in the webalizer-3-0-5-1 folder.

This project hasn't been converted to ICL project, as my ICL license seems no longer work on this machine. The source compiles under VS6/8 and GCC3/4, so I hope you will be able to convert it yourself.

Andre

wordy79@hotmail.com:I think there's a tradeoff in there that you have to accept. I have noticed that ICC is slower at compiling than GCC, but while it takes 2-3x longer to compile the code, the code ends up running 4-7x faster. That is a tradeoff I can live with, especially since you compile once, and run many, many times.

It's 6-8 times longer on Windows. Of course, it doesn't matter as much if your project is small and you have to wait 8 minutes instead of one. It does, however, when the difference is in hours.

Sure, I will accept the tradeoff after Intel folks say that they looked into this and there's no way they can improve compilation speed.

Jennifer J. (Intel)'s picture

>>

I made a VS8 project, which is available at the same location:

http://www.stonesteps.ca/downloads/

Thanks for the VC8 project. I'll investigate.

If there's any change to improve the compile-time, I'll file a bug. It's always nice to have a testcase to verify.

Jennifer J. (Intel)'s picture

For some reason, I can not duplicate the 6x slow. I got 2x slow. cl 2005-48s, icl-95s.

I created a build.bat and tested from command line. The problem is that cl is 48s, but you have 11s.

Did you try the VC8 project? Attached the build.bat so you can try building from cmd window.

Attachments: 

AttachmentSize
Download build.bat.txt3.33 KB
madjljiang:Did you try the VC8 project?

Not this project, although all numbers I quoted in this thread are all for 64-bit VC8 compared with. 64-bit ICL, building parts of a much larger project.

The SSW project does show 4x difference when I tried to build it in VS6 - VC6 took 38 seconds and ICL took 2 min 20 sec. I realize that VC6 is not supported - that is all I can use for this project, though.

Anyway, since SSW was the only sample I could provide the source for, which doesn't help much in this case, I guess this makes it impossible for you to troubleshoot this problem any further. Hopefully, somebody else will be able to provide another sample.

Thanks for taking time to look into this, Jennifer. It is much appreciated.

Andre

Login to leave a comment.