[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcc 3.2 not faster

On Wed, 8 Jan 2003 17:49, Daniel Jacobowitz wrote:
Version 1.93b          write   read putcNT getcNT   putc   getc  putcU  getcU
lyta                     437    559   9052   9478   1694   1734  24757  48029

GCC 3.2:
Version 1.93b          write   read putcNT getcNT   putc   getc  putcU  getcU
                         441    568   7955   8573   1617   1698  18731  28544

> > putcU/getcU is putc_unlocked() and getc_unlocked().
> >
> > putcNT/getcNT is putc() and getc() in a program that's linked without
> > thread support.
> >
> > When linked with thread support putc/getc do extra locking which gives
> > about the same speed on both compilers.
> >
> > The source to this is in http://www.coker.com.au/bonnie++/experimental/
> High numbers good?  Low numbers good?  Looks like high numbers from the
> above.  Would you care to analyze the difference so that something can
> be done about it, or to try it with gcc-snapshot?

It's fairly simple.  The benchmark creates a 40MB file and then reads and 
writes it a byte at a time.

The tests are done by two programs, one is linked with -lpthread and does 
everything except the NT (Not Threaded) tests.

The first thing to note is that getc_unlocked() and putc_unlocked() give 76% 
and 59% the performance that they got when compiled with GCC 2.95.  All tests 
are done with the same libc6, so it's just a matter of GCC optimising shared 
object calls.

As for trying it with gcc-snapshot, currently the latest experimental version 
of Bonnie++ does not compile on GCC 3.2 which is something I have to work on.  
The getc_putc test compiles OK and I had a hunch it would be worth running to 
compare the GCC versions...

http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page

Reply to: