Mail Archives: djgpp/2009/12/20/14:35:08
20.12.2009 3:59, Rugxulo kirjoitti:
> Hi,
>
> On Dec 17, 12:56 pm, Andris Pavenis<andris DOT pave DOT DOT DOT AT iki DOT fi> wrote:
>
>> This is announcement of DJGPP port of GMP-4.3.1
>>
>> GNU MP is a portable library written in C for arbitrary precision
>> arithmetic on integers, rational numbers, and floating-point numbers.
>>
>> See http://gmplib.org/ for more details.
>>
> Dumb question, but why don't they make "--enable-fat" the default for
> x86? I just built it, and it's a little larger, but it should
> (ideally) be much faster, esp. for time-intensive things that use it
> (e.g. GCC) since it checks at runtime what cpu-specific code to run.
>
> (your compile for /beta/):
> -rw-a-- 3.0 fat 517550 b- defX 09-Dec-13 18:23 lib/libgmp.a
> -rw-a-- 3.0 fat 22976 b- defX 09-Dec-13 18:23 lib/libgmpxx.a
> -rw-a-- 3.0 fat 247714 b- defX 09-Dec-13 18:23 lib/libmp.a
>
> (my compile using /beta/):
> 12/19/2009 06:50 PM 651,238 libgmp.a
> 12/19/2009 06:50 PM 23,300 libgmpxx.a
> 12/19/2009 06:51 PM 377,556 libmp.a
>
> http://rapidshare.com/files/323273044/gmp431b-beta-fat.zip.html
> MD5: C961D95121DCCC8A76A243A0F609798C
>
>
Well, did some tests (DJGPP v204pre only) using gmp-chudnovski.c
(http://gmplib.org/pi-with-gmp.html).
In both cases the task was to compute pi with 100000000 digits.
1) the configure option --enable-fat is added:
D:\DJDEV\gmp\test>gmp-chudnovsky.exe 100000000
#terms=7051366, depth=24
sieve time = 1.483
..................................................
bs time = 660.055
gcd time = 0.000
div time = 55.000
sqrt time = 29.615
mul time = 21.264
total time = 767.582
P size=145605885 digits (1.456059)
Q size=145605879 digits (1.456059)
2) the library from earlier build (no --enable-fat)
D:\DJDEV\gmp\test>gmp-chudnovsky.exe 100000000
#terms=7051366, depth=24
sieve time = 1.483
..................................................
bs time = 925.659
gcd time = 0.000
div time = 74.011
sqrt time = 43.407
mul time = 28.571
total time = 1073.296
P size=145605885 digits (1.456059)
Q size=145605879 digits (1.456059)
As one can see, there is some improvement when --enable-fat has been
specified.
I do not believe that compilation speed of GCC is noticeably dependant
on optimization level of GMP.
As far as I understand GMP and MPFR is being using for propagating
constants (if one specifies
some constant expression, GCC tries to calculate value in compile time
instead of genarating code
for evaluation this expression). I guess that the number of such
constant expressions is usually too small
to cause any noticable increase of compilation time dues to
non-optimality of GMP.
Andris
- Raw text -