gcrypt, MPI, GMP and powerpc64

Victor Stinner haypo at inl.fr
Tue Jul 25 18:21:44 CEST 2006


Hi,

I'm benchmarking NuFW on PowerPC 64 bits and I see that MPI is using 80 to
90% of the CPU during gnutls_handshake(). Here are the top 5 functions:
  45.94%   _gcry_mpih_submul_1
  21.46%   _gcry_mpih_addmul_1
   6.17%   _gcry_mpih_add_n
   4.64%   _gcry_mpih_sub_n
   2.88%   _gcry_mpih_divrem
   2.59%   _gcry_mpih_mul_1

I dig into gnutls and gcrypt, and I see that there is no assembler version
of MPI (for ppc64). I also learned that MPI is based on old GMP release
(which release?).

So questions:
- Can someone write assembler code for ppc64? It should be easy since GMP
prototypes look to be the same, and assembler code for ppc64 already exist
in GMP.
- Would it possible to use GMP in gcrypt?
- Why using MPI instead of GMP?

For GMP, download http://ftp.sunet.se/pub/gnu/gmp/gmp-4.2.1.tar.bz2 and
read mpn/powerpc64/mode64/*.asm.

I see that a 32 bits mode exists, but I don't need it. The computer is
running in full 64 bits mode.

Victor Stinner aka haypo




More information about the Gcrypt-devel mailing list