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

Re: libmoto PowerPC-optimized math library?



*sigh*

So, after a bit more experimentation, I'm not seeing much of a
difference.

I built the nbench-byte benchmarking program (BYTEmark* Native
Mode Benchmark ver. 2 (10/95) Index-split by Andrew D. Balsa
(11/97) Linux/Unix* port by Uwe F. Mayer (12/96,11/97)), available
from <http://www.math.vanderbilt.edu/~mayer/linux/bmark.html>.

I compiled it with CFLAGS set to -s -static -Wall -O3
-fomit-frame-pointer -funroll-loops.

LINKFLAGS was left empty for the first build, changed to
-L/usr/local/lib/mass -lmass for a build with the IBM libmass
library, and to -L/usr/local/lib/libmoto -lmoto for a build with
the Motorola libmoto library.

I then ran them once on my system (PowerCenter 132; 132 MHz 604e;
80 MB of RAM), while running X, Communicator, Emacs, exmh, and a
bunch of gnome-terminals.  (Not the ideal test environment, but
the results make it pretty clear that it doesn't really matter.)

The results were less than impressive:

===========================================================================
                     Iterations per second
                     ---------------------------------------------------- 
 Test                No math library   IBM libmass    Motorola libmoto
 ------------------------------------------------------------------------
 Numeric Sort                48.163          48.162          48.261
 String Sort                 5.0966          5.0686          5.1025
 Bitfield                14,750,000      14,645,000      14,714,000
 FP Emulation                5.8247          5.8366          5.8298
 Fourier                     774.03          772.82          2961.3
 Assignment                 0.81995         0.80723         0.77013
 Idea                        305.93          306.75          307.22
 Huffman                     89.318          89.414          89.351
 Neural Net                  1.5674           1.565          2.0439
 LU Decomposition            27.715          29.364          29.943

 Original Bytemark Results
 ------------------------------------------------------------------------
 Integer Index                2.559           2.554           2.539
 Floating-Point Index         1.471           1.498           2.579

 Linux Data
 ------------------------------------------------------------------------
 Memory Index                 0.532           0.528           0.521
 Integer Index                0.732           0.733           0.734
 Floating-Point Index         0.816           0.831           1.430
===========================================================================

Of note is the fact that there is very little difference between
the benchmark results with no extra math library and with the
libmoto library except for the Fourier transform test, where
there's a pretty dramatic difference (improvement of about 3X with
libmoto over no special library).  Using the IBM library actually
resulted in *poorer* performance overall, especially noticeable in
the Fourier transform.  That appears to be because the IBM
library, as provided, doesn't work with Linux.

I also tried compiling various xscreensaver hacks with libmoto,
and compared their performance with the performance of hacks
without libmoto.  I couldn't see any difference.

So much for that.

   CMC

+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
 Behind the counter a boy with a shaven head stared vacantly into space, 
 a dozen spikes of microsoft protruding from the socket behind his ear.
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
   C.M. Connelly               c@eskimo.com                   SHC, DS
+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+ 



Reply to: