From: Chris D. <da...@ya...> - 2004-05-31 00:08:23
|
I managed to get the Intel C++ Compiler (free linux license) installed under coLinux. You may recall that I was trying to install it on the Fedora Core 1 basic image that is available from the SourceForge page. The install script was failing during rpm installation. I decided to just try installing the rpms by hand. Well, when I did so I discovered a number of dependencies that were unsatisified (sorry, I forgot to write down which ones.) So I just used apt-get to install the required dependencies. I then manually installed the rpms. Finally, I re-ran the install.sh script. The only remaining problem was that the INSTALL_PATH did not get set in some of the scripts in the /opt/intel/bin directory. After a little global replacement using vi, all is well and good in the world. So I used it to compile a short code snippet (in a loop) from some AI stuff I have been plaing with. The code is just some basic calculations including addition, subtraction, rand(), pow() and sqrt() interating through data stored as ints and chars in fixed length arrays. No disk i/o or writing to stdout. For this little loop, the coLinux code actually seems to run about 1% (significant?) FASTER than the same code compiled with the Windows version of the same Intel compiler. (I used the "time" shell command to do my timings) I ran the same code in a smaller loop to compare some Windows compilers. I used gcc, Visual Studio .NET and the Intel compiler. Here are some approximate results: First, using default optimizations: VS.NET - 28 secs gcc - 80 secs Intel - 2.5 secs! Now using optimizations like -O3 (and -O2) and targeting my P4 etc... VS.NET - 25 secs gcc - 25 secs Intel - 1.8 secs! Intel under Mandrake - 1.8 secs! As I mentioned above, I also compared Intel under coLinux and Windows with a 10X loop and they performed almost exactly the same. (maybe 1/10 second difference in favor of colinux. Needless to say, I am floored by this. I do realize that this isn't a very good real-world benchmark. Things like disk I/O will make the advantage significantly smaller. But it definately convinced me that using the Intel compiler for my hardcore number crunching was worth while. I guess that is the advantage building the compiler when you also built the CPU. ;-) Hope someone finds this interesting. If anyone else installs the Intel compiler and does some similar number crunching, I would be interested in hearing if you see the same dramatic differences. --Chris ===== There is a very fine line between "hobby" and "mental illness." --Dave Barry linux dvds: http://www.LinuxDVDs.com beginners robotics: http://www.robots101.com personal pages: http://www.dahlweb.net |