Andy Polyakov wrote:
I'm looking into http://gcc.gnu.org/PR19923
which claims that gcc-4.0 is slower on 'openssl speed'
than earlier versions.   The only huge regression seems
to be in md2.  ...

I'm interested in the observed performance regression even with the
hand-coded assembly; that simply should not be happening.

... no-asm is really the only representative option to compare compilers or compiler versions.

As it turned out, the same regression was present with
no-asm.  (Hmm.)  It only occurs for -PIC with -O2 or -O3.
Omitting -PIC made the slowdown go away.

Deriving a minimal test case
was extremely straightforward; here's how it evolved:
  1. verify "openssl speed" shows slowdown
  2. verify "openssl speed md2" show slowdown
  3. build crypto/md2/md2.c, verify that 'time md2 < 32megabytefile' shows 
slowdown
  4. replace -lcrypto with .o files from build directory, verify that still 
shows slowdown
  5. replace .o files with .c files, verify
  6. cat .c files together into one big one, verify
  7. preprocess big .c file into big .i file, verify
  8. remove most of .i file, get rid of argv handling, verify
And that yielded a nice 200 line preprocessed C source file
which showed the problem.  Uploading that to
http://gcc.gnu.org/PR19923, along with timing
results for various compilers and optimization options
showing the regression, was like throwing chum to sharks.
Within a couple hours, the gcc developers had confirmed
the problem, and posted the offending generated code.

How quickly they'll fix it is another matter, but at
least now they're on the case.  If we're lucky, gcc-4.0.1
will have a fix.
- Dan

--
Trying to get a job as a c++ developer?  See 
http://kegel.com/academy/getting-hired.html
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to