Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Solar Designer <solar@cannabis.dataforce.net>
Subject: ccc vs. egcs at integer ops
Date: 1999/10/05	[thread overview]
Message-ID: <7tcjfb$e5n$1@prince.dataforce.net> (raw)

Hi,

I'm posting this for discussion here, as poor code performance doesn't
seem to qualify as a problem in the submission form on the support site.

Basically, in my testing the ccc beta doesn't seem to make efficient use
of the integer registers, in functions that have more than ~20 integer
variables in them.  Both egcs and cc on DU have no problem allocating
the registers efficiently for the very same C sources.

One example is my bitslice DES code --

[ghost@alice src]$ objdump -d DES_bs_b.o-egcs-1.1.2 | grep -c st[ql]
429
[ghost@alice src]$ objdump -d DES_bs_b.o-ccc-6.2 | grep -c st[ql]
1332
[ghost@alice src]$ size DES_bs_b.o-egcs-1.1.2 DES_bs_b.o-ccc-6.2
   text    data     bss     dec     hex filename
  18816       0       0   18816    4980 DES_bs_b.o-egcs-1.1.2
  25360       0       0   25360    6310 DES_bs_b.o-ccc-6.2

The ccc version of the code runs 3 times slower on my 21164PC, where the
stores are quite expensive (both versions still fit into the cache: this
file contains three separate loops of about equal size).

This was compiled with "-arch host -O2"; the code became even slower with
"-O4", mostly because of the extra NOP's making it use more of the cache.

These results are consistent with those for my other crypto codes.  For
example, ccc produces slightly better (than egcs) code for a traditional
implementation of MD5 (which doesn't need much registers).  However, for
the two-hashes-at-a-time implementation (that adds some instruction-level
parallelism), ccc does lots of unnecessary memory stores, as if it was
running out of registers (there _are_ enough registers for that task, in
reality).  Once again, egcs uses the registers for my 2xMD5 code, so that
it's almost twice faster than the ccc-compiled version.

Is anyone else seeing similar behavior?

-- 
/sd



             reply	other threads:[~1999-10-05  4:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-05  4:00 Solar Designer [this message]
1999-10-05  4:00 ` ccc vs. egcs at integer ops Robert Harley
1999-10-05  4:00   ` Solar Designer
1999-10-06  4:00     ` Robert Harley
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox