random variate from power exponential distribution: performances
Giulio Bottazzi
giulio.bottazzi@libero.it
Mon Sep 27 16:27:00 GMT 2004
On Mon, 27 Sep 2004 11:00:08 -0500
Linas Vepstas <linas@austin.ibm.com> wrote:
> You should test again with optimization turned on. This can make
> a *huge* difference in relative performance. Without optimization,
> the compiler does literally what the C code says, with an excess use
> of register-to-register copies. Thus, and sort of redundant
Hi Linas,
very good point! What you suggest is longer to say than to do
gcc -O3 -march=i686 -lgsl -lgslcblas testran.c -o testran
results (ignore the value for a, it doesn't matter) :
value for a value for b JOHNSON (secs) TADIKAMALLA (secs)
1.000000 0.500000 0.540000 3.630000
1.000000 0.600000 1.590000 2.880000
1.000000 0.700000 1.550000 2.500000
1.000000 0.800000 1.490000 2.290000
1.000000 0.900000 1.430000 2.170000
1.000000 1.000000 0.510000 0.220000
1.000000 1.100000 1.330000 2.160000
1.000000 1.200000 1.330000 2.180000
1.000000 1.300000 1.330000 2.160000
1.000000 1.400000 1.320000 2.180000
1.000000 1.500000 1.310000 2.180000
1.000000 1.600000 1.320000 2.170000
1.000000 1.700000 1.300000 2.170000
1.000000 1.800000 1.290000 2.180000
1.000000 1.900000 1.290000 2.180000
1.000000 2.000000 1.290000 0.410000
1.000000 2.100000 1.280000 4.370000
1.000000 2.200000 1.270000 4.370000
1.000000 2.300000 1.270000 4.360000
1.000000 2.400000 1.260000 4.370000
1.000000 2.500000 1.260000 4.370000
1.000000 2.600000 1.250000 4.370000
1.000000 2.700000 1.250000 4.380000
1.000000 2.800000 1.250000 4.380000
1.000000 2.900000 1.250000 4.380000
1.000000 3.000000 1.230000 3.920000
1.000000 3.200000 1.230000 4.390000
1.000000 3.400000 1.230000 4.370000
1.000000 3.600000 1.220000 4.370000
1.000000 3.800000 1.210000 4.370000
1.000000 4.000000 1.210000 3.960000
comment: things did not change, JOHNSON is ALWAYS faster.
BTW I've tested also on a dual opteron compiling with
gcc -O3 -lgsl -lgslcblas testran.c -o testran
guess what? same thing: JOHNSON is ALWAYS faster.
Any other optimization option to suggest?
G.
--
Giulio Bottazzi <bottazzi@sssup.it>
Laboratory of Economics and Management
Sant'Anna School for Advanced Studies, Pisa, Italy
Phone: (+39)-050-883365 Fax: (+39)-050-883344
URL: http://www.sssup.it/~bottazzi/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gsl-discuss/attachments/20040927/d40061af/attachment.sig>
More information about the Gsl-discuss
mailing list