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

Re: libmoto PowerPC-optimized math library?



"C.M. Connelly" <c@eskimo.com> writes:

> *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>.

[...]

> 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.

Ok.  I just looked at the benchmarks, and from what I can tell, the
only test that even *uses* trancedental functions is the Fourier
coefficient one.  So that's why the tests are so close on the others.
Someone else on this list suggested that libmoto was faster because
the calculations are less accurate.  The Fourier benchmark does *not*
test for correctness, so this is entirely plausible.  These functions
are generally approximated and then successively refined through
iteration, so it's easy to code them to stop sooner if you don't care
about accuracy.

Anyway, my guess is that *very* few applications even use the
functions that are sped up, and, among those that do, you probably
don't want to use libmoto, since you probably care about the results.

my $0.02,

cbb



Reply to: