status
Juergen Bullinger
juergen.bullinger at gmx.de
Fri Feb 17 01:05:25 CET 2006
Hello Joppe,
thank you very much of your test and also for the feedback.
Please note that the function phi is only performed in very special
cases. If the module is small, the exponent is much larger and GMP is
setup to use this function (maybe that is a default).
For the aggreated patch I wrote a little shellscript which I needed
anyway to apply the patches. But nothing elegant. At the moment
unfortunately I have some problems. I updated gcc to 4.0.2, because I
read here that 4.0.0 has some bugs. But now I get some memory errors if
I do a "make check". I'll try to check that again with another gcc
version.
regards
Juergen
Am Donnerstag, den 16.02.2006, 16:44 +0100 schrieb Joppe Bos:
> Hello,
>
> I tested your code on this machine:
> cat /proc/cpuinfo
> processor : 0
> vendor_id : AuthenticAMD
> cpu family : 15
> model : 47
> model name : AMD Athlon(tm) 64 Processor 3000+
> stepping : 0
> cpu MHz : 1802.397
> cache size : 512 KB
> fpu : yes
> fpu_exception : yes
> cpuid level : 1
> wp : yes
> flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
> cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm
> 3dnowext 3dnow pni
> bogomips : 3530.75
> TLB size : 1024 4K pages
> clflush size : 64
> cache_alignment : 64
> address sizes : 40 bits physical, 48 bits virtual
> power management: ts fid vid ttp tm stc
>
> with: __TIMING_ON__, __USE_GMP_POWM__ and __BASE_IS_PRIME__ defined.
> I modified only this line: typedef long unsigned powmtype;
>
> I run the newest GMP version with the assembly code profided in this
> mailinglist. I compiled with:
> gcc -O3 -Wall -o phitest phitest.c -lgmp
>
> I canceled the output after five hours, the output is:
>
> time ./phitest
> measuring runtime in high range:
> Time for new function=11 sec
> Time for old function=16 sec
> measuring runtime in low range:
> Time for new function=26 sec
> Time for old function=38 sec
>
>
> checking for correctness (divisibility)
> the function seems to be correct
> starting long check for correctness!
> for each number n we check if base^eulerPhi(n)=1 (mod n) which always
> should be true!
> 450676002/2100000100
>
> real 306m3.687s
> user 292m44.141s
> sys 0m6.388s
>
> So everything looks like it worked ok. Your code is indeed faster.
>
> I am interested in such an aggregated patch, I have only applied the new
> gcd code once but never tried to use other tid bits.
>
> I hope this helped you,
>
> Joppe Bos
>
>
> On Thu, 16 Feb 2006 juergen.bullinger at gmx.de wrote:
>
> > Hello all,
> >
> > last weekend I sent a optimized function for gmp. It runs 20-30% faster than
> > the original one. Has anybody tested it so far?
> > It should be pretty easy, because I even included the test code.
> >
> > Second was that I offered to maintain an aggregated patch, because the
> > patches on the tid bits site unfortunately are not compatible against each
> > other. Unfortunately I got no answer. Is there no need for such a thing? If
> > not, then it would also be interesting to know that. On the other hand I
> > think you also will have not so many testers for your patches if they can
> > not be applied easily.
> >
> > Do you really want help for this project?
> >
> > regards
> > Juergen
> >
> > --
> > Telefonieren Sie schon oder sparen Sie noch?
> > NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie
> > _______________________________________________
> > gmp-discuss mailing list
> > gmp-discuss at swox.com
> > https://gmplib.org/mailman/listinfo/gmp-discuss
> >
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at swox.com
> https://gmplib.org/mailman/listinfo/gmp-discuss
>
--
Juergen Bullinger <juergen.bullinger at gmx.de>
More information about the gmp-discuss
mailing list