This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Performance of Integer Multiplication on PIII


Hi!

A slight step off-topic.

-Regarding architectural differences between the (now) 4 different P6
 incarnations P6 Model 1 to 4 (aka PPro, PII, PIII and PIII-Tualin):
 There are no significant differences between them, that justify special
 -march sub options (at least in 32 bit mode) for gcc.
 Whithin a small margin, they perform all equal, if you "divide out" the
 differences of the evironments (Chipsets, RAM & RAM-speed, CPU internal
 speed,...)

-In respect of possible options for different cache size & speed: GCC will
 not do you homework. If you want to exploid that, you had to work it out
 yourself. Or use adapted libraries. Example: ATLAS,
    http://www.netlib.org/atlas/index.html.
 Fortuanately, for generic cases, it suffice to know that there is a cache to
 speed up your application. You even don't need to know how large and how
 many levels there are.  And this is very likely to yield much larger
 speed-ups, than any compiler with special arch suboptions can give you.

-In respect of arcitectuaral extensions (MMX, SIMD, 3dnow, ...): There
 might be special options to serve this.

 If i am informed right, there is currently only support for MMX in GCC.
 SIMD extensions are "work in progress". (?)

-In respect of the PIV (as public relations call it): This is just a
 different CPU. So much different, that i suggest, we are better of, not
 to biase -march=i686 for it's various quirks. I.e.: For this CPU, one
 should indeed use a new arch sub option.
 (I'am not informed about to what extent this is done in gcc-3.1)


-On topic:
 (See below)

Hope that helps,

 Peter Schorsch

> When running these same tests on on Mobile Pentium MMX (using -march=i586)
> Gcc code does out perform mine.  I do not have anything in between to run
> these tests on so I would appreciate it if someone with a Pentium Pro and
> PII (or is that the same thing as a Pentium Pro?) could run them and post
> the results.

 Form Agner Fog (http://www.agner.org/assem/) pentopt.zip

                 PPlain      PMMX    PPro    PII   PIII
 IMUL latency       9          9       4      4      4
 IMUL throughput   1/9        1/9     1/1    1/1    1/1

 That means, imul is pipelined on i686 ...

> So I guess the lesson here is that on PIII integer multiplication is fast
> enough that doing special tricks to avoid integer multiplication will hurt
> performs in stead of helping it.

> Is this a known issue?  And if so does anyone plan on addressing it.  I
> seams to me that the only fix would me to introduce more options for
> -march and -mcpu for the faster Pentiums.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]