[FYI] the potential of GMP -> CLN -> GiNaC boosts

Richard B. Kreckel kreckel at ThEP.Physik.Uni-Mainz.DE
Tue May 2 22:52:58 CEST 2000


Hi,

Since GMP3 has been released we are now in the process to adapt CLN to
make use of that new library.  While GMP3 seems to be much faster than
GMP2 (largely because of the support of common new processors like PPro
and also due to some improved algorithms with better asymptotic behaviour)
and CLN does see a large chunk of this improvement I have the impression
that most common symbolic computations don't actually benefit too much
from this.

Just because I was curious, I have made a preliminary statically linked
GiNaC suite of timings, once with the old CLN using GMP2 and once with a
CLN using the new GMP3.  The results are interesting in a sense that they
don't show much improvement.  I have marked the tests which make heavy use
of the class GiNaC::numeric (and thus are expected to run faster now) with
an asterisk, the others with a dash:

timing commutative expansion and substitution.... passed                       -
        size:       25      50      100     200
w/GMP2: time/s:     0.03    0.16    0.67    2.99
w/GMP3: time/s:     0.04    0.15    0.66    3.01
timing Laurent series expansion of Gamma function.... passed                   -
        order:      10      15      20      25
w/GMP2: time/s:     0.130   0.709   3.26    12.65
w/GMP3: time/s:     0.119   0.719   3.209   12.48
timing determinant of univariate symbolic Vandermonde matrices.... passed      -
        dim:        4x4     6x6     8x8     10x10
w/GMP2: time/s:     0.002   0.02    0.299   2.91
w/GMP3: time/s:     0.003   0.02    0.299   2.88
timing determinant of polyvariate symbolic Toeplitz matrices.... passed        -
        dim:        5x5     6x6     7x7     8x8
w/GMP2: time/s:     0.035   0.190   0.959   4.15
w/GMP3: time/s:     0.036   0.179   0.930   4.08
                                                            w/GMP2:   w/GMP3:
timing Lewis-Wester test A (divide factorials).             0.35      0.35     *
timing Lewis-Wester test B (sum of rational numbers).       0.027     0.027    *
timing Lewis-Wester test C (gcd of big integers).           0.45      0.45     *
timing Lewis-Wester test D (sum of rational fcns).          0.00085   0.00086  -
timing Lewis-Wester test E (sum of rational fcns).          0.00082   0.00081  -
timing Lewis-Wester test F (gcd of 2-var polys).            0.095     0.095    ?
timing Lewis-Wester test G (gcd of 3-var polys).            3.35      3.21     ?
timing Lewis-Wester test H (det of 80x80 Hilbert).         10.88     10.30     *
timing Lewis-Wester test I (invert rank 40 Hilbert).        4.10      3.97     *
timing Lewis-Wester test J (check rank 40 Hilbert).         1.90      1.86     *
timing Lewis-Wester test K (invert rank 70 Hilbert).       26.34     25.29     *
timing Lewis-Wester test L (check rank 70 Hilbert).        10.96     10.70     *
timing Lewis-Wester test M1 (26x26 sparse, det).            0.46      0.46     -
timing Lewis-Wester test O1 (three 15x15 dets, average)... 49.51     49.31     -
timing Lewis-Wester test P (det of sparse rank 101).        5.49      5.49     *
timing Lewis-Wester test P' (det of less sparse rank 101). 10.02      9.69     *
timing Lewis-Wester test Q (charpoly(P)).                 145.71    144.10     *
timing Lewis-Wester test Q' (charpoly(P')).               293.92    289.26     *

It's embarassing that the four first tests show a common pattern: the new
library runs slightly faster with large problem sizes and slower with
small once.  It's perfectly reproducible.  Can anybody suggest a possible
explanation for this?

Cheers
    -richy.
-- 
Richard Kreckel
<Richard.Kreckel at Uni-Mainz.DE>
<http://wwwthep.physik.uni-mainz.de/~kreckel/>





More information about the GiNaC-devel mailing list