On Tue, 31 Jul 2001, I wrote:
Talking about KAI's C++ compiler, I just tested it. [...]
Talking about Intel's Reference Compiler, I just tested the x86-edition, version 5.0beta for Linux on the CLN/GiNaC system. It detected a few minor glitches in the GiNaC code that went undetected by all GCC versions and by KAI and Portland Group. Those are being fixed in our CVS tree. The Intel compiler is really good w.r.t. ISO standard conformance. With the usual two preprocessor settings it compiled vanilla CLN-1.1.2 statically and passed all the checks. Then it came to GiNaC's timings and there the Intel compiler showed it is *not* doing a good job. Maybe if one tunes the whole system for Pentium-IV or such the picture will change. Maybe switching on Intel's global optimizations would help, too. I couldn't do that because the compiler chose to segfault every time I tried. :-( Without more ado, here are the timings in seconds (static, stripped binaries) on a P-III 800: commutative expansion and substitution (a.k.a. Denny Fliegner's test) size GCC 3 Intel-C++ 5 Ratio 50 0.08 0.11 1.38 100 0.35 0.50 1.42 200 1.57 2.19 1.39 Laurent series expansion of Gamma function order GCC 3 Intel-C++ 5 Ratio 15 0.27 0.38 1.41 20 1.219 1.74 1.42 25 4.879 6.73 1.38 determinant of univariate symbolic Vandermonde matrices dim GCC 3 Intel-C++ 5 Ratio 6x 6 0.006 0.010 1.67 8x 8 0.11 0.15 1.36 10x10 1.01 1.52 1.50 determinant of polyvariate symbolic Toeplitz matrices dim GCC 3 Intel-C++ 5 Ratio 6x 6 0.065 0.08 1.23 7x 7 0.30 0.39 1.30 8x 8 1.32 1.66 1.26 Lewis-Wester test A (divide factorials) GCC 3 Intel-C++ 5 Ratio 0.11 0.56 5.09 Lewis-Wester test B (sum of rational numbers) GCC 3 Intel-C++ 5 Ratio 0.010 0.026 2.60 Lewis-Wester test C (gcd of big integers) GCC 3 Intel-C++ 5 Ratio 0.149 0.71 4.76 Lewis-Wester test D (normalized sum of rational fcns) GCC 3 Intel-C++ 5 Ratio 0.309 0.72 2.32 Lewis-Wester test E (normalized sum of rational fcns) GCC 3 Intel-C++ 5 Ratio 0.25 0.43 1.72 Lewis-Wester test F (gcd of 2-var polys) GCC 3 Intel-C++ 5 Ratio 0.032 0.05 1.56 Lewis-Wester test G (gcd of 3-var polys) GCC 3 Intel-C++ 5 Ratio 1.08 2.39 2.21 Lewis-Wester test H (det of 80x80 Hilbert) GCC 3 Intel-C++ 5 Ratio 4.509 7.09 1.57 Lewis-Wester test I (invert rank 40 Hilbert) GCC 3 Intel-C++ 5 Ratio 1.30 1.98 1.52 Lewis-Wester test J (check rank 40 Hilbert) GCC 3 Intel-C++ 5 Ratio 0.74 1.07 1.45 Lewis-Wester test K (invert rank 70 Hilbert) GCC 3 Intel-C++ 5 Ratio 8.81 13.67 1.55 Lewis-Wester test L (check rank 70 Hilbert) GCC 3 Intel-C++ 5 Ratio 4.35 6.55 1.51 Lewis-Wester test M1 (26x26 sparse, det) GCC 3 Intel-C++ 5 Ratio 0.17 0.24 1.41 Lewis-Wester test N (poly at rational fcns) GCC 3 Intel-C++ 5 Ratio 483.47 512.52 1.06 Lewis-Wester test P (det of sparse rank 101) GCC 3 Intel-C++ 5 Ratio 0.59 0.73 1.24 Lewis-Wester test P' (det of less sparse rank 101) GCC 3 Intel-C++ 5 Ratio 2.76 4.03 1.46 computation of an antipode in Yukawa theory GCC 3 Intel-C++ 5 Ratio 59.78 75.21 1.25 One could argue that this result is restricted to x86 and the situation looks different on real RISC machines. However, after trying some simple template-heavy tests with Sun's WorkShop 5.0 for UltraSparc we realized that GCC-3.0 performs better on real C++ code, even on that platform. I hope this helps debunk the two myths that GCC does not perform well and that CLN/GiNaC is not portable. Happy heavy hacking -richy. -- Richard Kreckel <Richard.Kreckel@Uni-Mainz.DE> <http://wwwthep.physik.uni-mainz.de/~kreckel/>