tags:

views:

264

answers:

3

First Question From a C programmer's point of view, what are the differences between Intel Core processors and their AMD equivalents ?

Related Second Question I think that there are some instructions that differentiate between the Intel Core from the other processors and vis-versa. How important are those instructions ? Are they being taken into account by compilers ? Would performances be better if there was some special Intel compiler only for the Core family ?

+3  A: 

First Question From a C programmer's point of view, what are the differences between Intel Core processors and their AMD equivalents ?

The most significant differences are likely to show up only in highly specialized code that makes use of new generation instructions, such as vector maths, parallelization, SSE.

Would performances be better if there was some special Intel compiler only for the Core family ?

Not sure if you are aware of it, but there's a compiler specifically for Intel cores: icc. It's generally considered to be the best compiler from an optimization point of view.

You might want to check out its wikipedia article.

none
These just normal compilers i guess. Not specially made for the Core family if i got it right.
tarek
you are guessing? You may want to provide some additional detail, about what it is exactly that you are referring to specifically. That would help us stop guessing :-)
none
That compiler is not specifically for Core (http://en.wikipedia.org/wiki/Intel_Core). It has code generation specific to Pentium 3, Pentium 4, and Core 2 (not to be confused with Core). See http://www.intel.com/software/products/compilers/docs/clin/main_cls/copts/common_options/option_march.htm
Matthew Flaschen
The guy didn't deserve to be voted down!
Ray Hidayat
What he said was wrong. icc is not only for Intel Core.
Matthew Flaschen
He said "cores", not "Cores". Anyway, Intel's compiler would seem to qualify as "some special Intel compiler".
bk1e
Ya, thanks everyone who took the time to actually bother downvoting my response, next time you better read a response carefully before you downvote it, the OP's question wasn't phrased particularly clearly either, so I kept my response vague and correct...
none
bk1e, the OP said, "some special Intel compiler only for the Core family". That is /not/ what icc is.
Matthew Flaschen
it certainly is the closest possible thing to it, though: Intel just happens to manufacturer not just one single processor type, but many different ones, that's also why they don't provide one specific compiler for one type of chip, but instead a compiler that produces optimized code for most of their modern architectures. I never said that icc only targeted the core family
none
+4  A: 
  1. If you are programming user-level code and most driver code, there aren't many differences (one exception is the availability of certain instruction sets - which may differ for different processors, see below). If you are writing kernel code dealing with CPU-specific features (profiling using internal counters, memory management, power management, virtualization), the architectures differ in implementation, sometimes greatly.

  2. Most compilers do not automatically take advantage of SSE instructions. However, most do provide SSE-based intrinsics, which will allow you to write SSE-aware code. The subset of all SSE levels available differs for each processor architecture and maker.

See this page for instruction listings. Follow the links to see which architectures the specific instructions are supported on. Also, read the Intel and AMD architecture development manuals for exact details about support and implementation of any and all instruction sets.

ASk
+1  A: 

According to the Intel Core Wikipedia article, there were notable improvements to SSE, SSE2, and SSE3 instructions. These instructions are SIMD (same instruction, multiple data), meaning that they are designed for applying a single arithmetic operation to a vector of values. They are certainly important, and have been made used by compilers such as GCC for quite awhile.

Of course, recent AMD processors have adopted the newest Intel instructions, and vice-versa. This is an ongoing trend.

Matthew Flaschen