OON: Intel C/C++ compiler

From: Todd Veldhuizen (todd@p200.cybervision.com)
Date: Thu Aug 21 1997 - 09:34:18 EST


Intel has a C++ compiler that will interest some people. It's called
"Intel C/C++", and can be used standalone or as a plug-in with Visual
C++ (Windows'95/NT). Two things make this compiler exciting:

1. It's based on a fairly recent front end from the Edison Design Group,
    so it has near draft standard syntax support.
2. It claims to be an "extreme" optimizing compiler.

Thanks to Nathan Myers for pointing it out to me, and the folks at Intel
for providing an evaluation copy.

Web information:
    http://developer.intel.com/design/perftool/icl24/
    http://developer.intel.com/design/perftool/icl24/icl24wht.htm

The compiler comes as part of the VTune 2.4 CD-ROM (suggested retail $279 US).
This CD has lots of goodies on it:
* Performance tuning environment
    Interactive graphical interface
    System wide monitoring (will profile all active software simultaneously,
      including operating system)
    Static assembly analysis (annotates instructions with performance
      information)
    A "coach" which identifies opportunities for better performance in
      C++/C/Fortran code
* C/C++ compiler
    MMX intrinsics
    Profile-guided optimization
    Interprocedural optimizations
    Generate Pentium, Pentium Pro instructions
    Produce well-optimized floating-point code
* Performance library suite
    Library routines written using MMX technology for signal processing,
        image processing, math kernels
    The math kernels consist of BLAS level 1, 2, 3 and some FFT routines
* Fortran compiler
* Online documentation of the Intel architecture, with lots of optimization
  tips

Here's a partial feature list for the C++ compiler. The list is based
on the Blitz++ compiler suite, so it emphasizes templates:

What does work:
- member templates
- const_cast<T>, dynamic_cast<T>, reinterpret_cast<T>
- RTTI
- exceptions
- newer "template<>" full specialization syntax
- default template parameters
- explicit template instantiation
- initialized member constants
- keywords: mutable, explicit
- namespaces
- templates with non-type parameters

What doesn't:
- Had difficulty compiling some of the standard library files which
  came with VC++, e.g. <complex>, <set>
- Trouble with complicated expressions in enum declarations
- No partial specialization or partial ordering
- No 'template' keyword qualifier
- No template template parameters
- No explicit function template qualification

The Blitz++ example programs built easily; the library was developed
on an EDG front end, so the port was fairly painless.

Comments on the optimizations:
- The compiler doesn't always honour the 'inline' keyword
- Its ability to do copy propagation isn't anywhere near KAI C++'s
- Expression templates overhead doesn't inline, so can't be eliminated
  (KAI C++ *will* eliminate it)
- It isn't as "C++ aware" as KAI C++ is. When I looked through the
  assembler for the Blitz++ examples, it was clear that the Intel
  compiler was stymied by things that KAI C++ optimizes.

Here are some benchmark results from Arch Robison's OOPACK benchmark:
(see http://www.kai.com/oopack/oopack.html)

This chart gives Mflops/s for a Pentium 133. Visual C++ was benchmarked
at /O2, and Intel C++ at /Ox.
                                                      Intel faster than
         +-- Visual C++ --+ +-- Intel C++ --+ Visual C++ by %
Benchmark C C++ C C++ C C++

Max 9.7 9.7 9.1 9.0 - 6% - 7%
Matrix 30.8 29.1 34.4 31.6 +12% + 9%
Complex 28.4 17.2 32.3 25.8 +14% +50%
Iterator 23.9 23.9 26.0 26.0 + 9% + 9%

So to summarize:
* Intel C++ has near draft-standard syntax; the biggest improvement
  over Visual C++ is support for member templates. KAI C++ is
  currently closer to full ISO compliance (it supports partial specialization
  and partial ordering, for example)
* It's a good optimizing compiler. It does a few optimizations which
  KAI C++ doesn't (such as interprocedural and intermodule analysis),
  but for the Blitz++ examples I looked at, KAI C++ did a much better
  job.
* Will give a decent performance boost over Visual C++

-- 
Todd Veldhuizen                                           todd@cybervision.com
                                Homepage: http://oonumerics.org/~tveldhui/



This archive was generated by hypermail 2b29 : Wed Feb 20 2002 - 03:20:05 EST