[PPL-devel] PPL beats cddlib (on one of its toughest tests).

Roberto Bagnara bagnara at cs.unipr.it
Wed Jul 7 22:58:51 CEST 2004


Enea Zaffanella wrote:
 > I downloaded cddlib-0.93a (which seems to be the latest release),
 > configured and build it, using default settings, i.e.,
 >
 > [zaffanella at spark cddlib-093a]$ ./configure
 > [...]
 > [zaffanella at spark cddlib-093a]$ make
 > [...]
 >
 > As for the PPL, I downloaded version 0.5 (the latest release) and I
 > configured and build it as follows.
 >
 > [zaffanella at spark ppl-vs-cdd]$ ../ppl-0.5/configure
 > --disable-asseretions --disable-debugging --enable-optimization=sspeed
 > --prefix=/tmp/opt3/ppl-0.5
 > [...]

By doing this, you have compiled cddlib with "-O2" and the PPL
with "-O3 -march=...", which should favor the PPL.
(BTW, assertions are disabled by default and debugging information
does not affect performance.)

 > So, on this example, not only the PPL is greatly outperforming cddlib
 > when using GMP, but to my even bigger surprise, our library also
 > outperforms the version of cddlib using floating point arithmetics!
 >
 > [...]
 >
 > Moreover, the cddlib floating-point computation seems to be unreliable,
 > since it produces a generator system of different cardinality (3002):
 > in particular, it deviates from the result of the GMP version starting
 > from the 4-th iteration (see the last but one column in the cddlib
 > output: 210 for GMP, 207 for floating points).

I believe floating point computations are totally unreliable in this
application domain.  To be more precise, I am pretty sure that in the
example you have tested, the computation done with the floating point
version has nothing to do with the real thing, i.e., it computes
something completely different.

 > Doesn't this look interesting?
 > Clearly, this is just a single experiment (maybe it was just luck!)
 > It would be nice to have a more thourough comparison.
 >
 > [...]
 >
 > PS: I am using GMP 4.1.2 and gcc 3.3.3.

It _is_ interesting!
I have repeated your experiment with a more bleeding edge setting:
PPL CVS head version, GMP 4.1.3, GCC 3.4.1, both cddlib and the PPL
compiled with "-O3 -march=athlon", everything running on an
AMD Athlon XP 2800+.

		PPL		cddlib (GMP)		cddlib (f.p.)
time		14.85		546.93 			36.84
norm. time	 1.0		 36.8			 2.5

(Notice that I include the timings of cddlib with floating point numbers
only to signify that I confirm the timings you have got; as I said
I do not think this figure has any significance whatsoever.)

A factor of more than thirty is worth a pat on our back.
Well done everybody!
Ciao,

     Roberto

-- 
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it




More information about the PPL-devel mailing list